This is a snippet of my code:
public static void main(String[] args) {
System.out.println("This is the square root game. Only two players allowed.");
Scanner scan = new Scanner(System.in);
System.out.println("How many rounds are you two playing?");
int numofRounds = scan.nextInt();
System.out.println("First player, what is your name?");
String firstPlayer = scan.nextLine();
System.out.println();
System.out.println("Second player, what is your name?");
String secondPlayer = scan.nextLine();
System.out.println();
Everything is ok: it reads in the next integer for numofRounds, and it reads in the next Line for secondPlayer, but it skips firstPlayer entirely and does not allow me to input for it. Why is this? Thanks in advance :)
Got it thanks!