Why is the code not reading nextLine()?
else if(input==5){
String artist = "Bob";
System.out.print("Artist: ");
artist = keyboard.nextLine();
Playlist artistList = defaultPlaylist.getSongsByArtist(artist);
artistList.printAllSongs();
}
When I run it, it completely skips [artist = keyboard.nextLine();]
keyboard is an instance of a scanner object.
Edit----------------------------------------------------------------------------------------------------------------------------
By "skips" I mean completely ignores. It doesn't ask for user input when I
run it.
No comments:
Post a Comment