Answers for "java get data from console"

1

how to read input in java

//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); 
}
Posted by: Guest on September-23-2020
1

read input from console

variable = input()
Posted by: Guest on July-28-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language