Get Input - Java Code Example

Snippet 1
  //For continues reading a line
import java.util.Scanner; 

Scanner in = new Scanner(System.in); 
while(in.hasNextLine()) {
   String line = in.nextLine();
   System.out.println("Next line is is: " + line); 
} 
Snippet 2
  InputUSer Scanner