Digital Marketing

Java Scanner class

One popular way to read input from Java stdin is by using the Scanner class and specifying the Input Stream as For example:
Scanner scanner = new Scanner(;
String myString =;
int myInt = scanner.nextInt();

System.out.println("myString is: " + myString);
System.out.println("myInt is: " + myInt);


Popular posts from this blog

Make online money from the Internet