Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

User input (scanner)

Scanner scanner = new Scanner(System.in);

System.out.println("What's your name?");
String name = scanner.nextLine();

System.out.println("What's your year of birth?");
int yearOfBirth = scanner.nextInt();
Source by github.com #
 
PREVIOUS NEXT
Tagged: #User #input
ADD COMMENT
Topic
Name
2+8 =