Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java accept user input

import java.util.Scanner;
Scanner keyboard = new Scanner(System.in);
int number = keyboard.nextInt(); // next() for Strings, nextDouble() for doubles (etc for other types), nextLine() for whole line. 
 
PREVIOUS NEXT
Tagged: #Java #accept #user #input
ADD COMMENT
Topic
Name
1+2 =