+ 1
How to accept a complete sentance as input in java
i tried using the following code but the code is excepting only the first word and not the entire sentance . plssss help here is the code Scanner scan =new Scanner(system.in); String s= scan.next(); system.out println("string is ",+s); my input: hello world output: hello
3 Respuestas
+ 18
I believe you will need nextline() instead of next() ?
+ 6
Use nextLine ()
+ 1
use nextLine() to read full