+ 1
Can someone explain this to me please (Java)
Iāve just started out yesterday (Iām currently on the arrays course on Java) and Iām confused on how to get user input. Thereās only been one lesson on it and the lesson didnāt really teach you how to do it, it just showed you how to import the scanner. Can someone please explain how to get user input in Java please? Like how do you get a string input? (The lesson only showed int) Thank you - a neek
6 Answers
+ 1
complete documentation
https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Scanner.html
0
So is it the double.parsedouble thing?
0
Jayden
No it's not a double.parseDouble things, Scanner class has nextDouble() method. Using scanner class object you can get double value input from the user.