write a program in java to print your name and address
Answers
Answered by
42
import java.util.*;
class Brainly
{
String name, Address;
Scanner demo = new Scanner(System.in);
System.out.println("Enter your name: ");
name = demo. nextLine();
System.out.println();
System.out.println("Enter your Address: ");
Address = demo. next Line();
System.out.println();
System.out.println("Your name is: " + name);
System.out.println("Your Address is:" +Address);
}
}
Hope this helps!
class Brainly
{
String name, Address;
Scanner demo = new Scanner(System.in);
System.out.println("Enter your name: ");
name = demo. nextLine();
System.out.println();
System.out.println("Enter your Address: ");
Address = demo. next Line();
System.out.println();
System.out.println("Your name is: " + name);
System.out.println("Your Address is:" +Address);
}
}
Hope this helps!
siddhartharao77:
:-))
Answered by
11
Java program to print your name and address:
class NameandAddress
{
public static void main (string args [])
{
System.out.println ("Your Name");
System.out.println ("Your Address");
}
}
Similar questions