I was making a program to take user input and passing it out but for some reason, the scanner class and next line don't even wait for the user to take input, instead, it just skips the whole take input part. Here is my code:
public class Demo{
public static void main(String[] args){
Scanner scanGenre = new Scanner("System.in");
System.out.println("Enter genre: ");
String genre = scanGenre.nextLine();
}
}
Basically, the program just ends without me typing any input, and I couldn't find a solution or explanation to this.