+ 4

If you want a string Scanner for input,what do I do? Do you put nextLong() or nextLine?

java

31st Mar 2018, 1:27 PM
Leon Yang
Leon Yang - avatar
2 Answers
+ 5
import java.util.Scanner; Scanner scan = new Scanner(System.in); String name = scan.nextline("");
31st Mar 2018, 1:30 PM
LordHill
LordHill - avatar
0
nextline()
26th Apr 2018, 6:57 AM
Auro archit Mishra
Auro archit Mishra - avatar