+ 1

What is the code to input something in java?

29th Nov 2017, 5:31 AM
Rex
2 Answers
+ 2
There is another way of input which is known as BufferedReader. It is described in this code: https://code.sololearn.com/cM5LBqctY4G8/?ref=app
29th Nov 2017, 6:12 AM
DAB
DAB - avatar
+ 1
At the top, you write : import java.util.Scanner; In your function, you write: Scanner scanner = new Scanner (System.in); String string = scanner.nextLine(); String string2 = scanner.next (): int integer = scanner.nextInt(); and other scanner functions.
29th Nov 2017, 5:59 AM
Jonas Schröter
Jonas Schröter - avatar