Taking Inputs
WAP to take input from user the user.
import java.util.Scanner;
class P02TakeInput
{
public static void main()
{
Scanner input= new Scanner(System.in);
System.out.println(" Enter your name ");
String name=input.next();
System.out.println(" Your name is " + name);
}
}
Comments
Post a Comment