Computer Science, asked by itraa2000, 1 year ago

write a program in java to print your name and address

Answers

Answered by siddhartharao77
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!

siddhartharao77: :-))
Answered by Brenquoler
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