Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to input in java

import java.util.Scanner;
...
  Scanner console = new Scanner(System.in);
  int num = console.nextInt();
  console.nextLine() // to take in the enter after the nextInt() 
  String str = console.nextLine();
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #input #java
ADD COMMENT
Topic
Name
7+8 =