Posts by Victor Ferraresi • 1 point
1 post
-
0
votes1
answer39
viewsA: Use of nextLine() in java
The problem is that the nextInt() does not consume the line break character \n, then the subsequent call from nextLine() consumes it, causing the program to skip to the reading of the string b. You…
javaanswered Victor Ferraresi 1