19. JAVA Program to Read given Address and Display it.
How does this program work?
- This program is used to print the scanned address given by user using java.
Here is the code
//To read the user address and display it
import java.util.Scanner;public class Address
{
public static void main(String args[])
{
String address;
System.out.println("Enter address\n");
Scanner obj1=new Scanner(System.in);
address=obj1.nextLine();
System.out.println(" Your Address is:"+address);
}
}