+ 1

the simple way to read from user in java ..

i want to take the data from the user in the simple way , i know there are many ways but i want to know the simplest one .. if u know please help me

1st Oct 2017, 12:25 PM
uzair rashid
uzair rashid - avatar
1 Respuesta
+ 2
Scanner scanner = new Scanner (System.in); int i = scanner.nextInt (); String s = scanner.nextLine(); //also: .next () etc.
1st Oct 2017, 12:31 PM
Jonas Schröter
Jonas Schröter - avatar