I'm trying to write a Java code to receive a string input but using nextLine() makes the compiler ignore the line of code. I replaced it with next() and it worked. What could be the problem.
I'm trying to write a Java code to receive a string input but using nextLine() makes the compiler ignore the line of code. I replaced it with next() and it worked. What could be the problem.