I'm new to maven and am working on a personal project. I have a line of code that is actually running before the previous line and it is confusing me beyond belief.
System.out.println("----------------------------------------------------");
System.out.println(" Main Menu");
System.out.println("----------------------------------------------------");
System.out.println("Select an option from below");
System.out.println("\t(1)Search\n"
+ "\t(2)TEST\n"
+ "\t(0)Quit");
System.out.print("Enter Here: ");
return input.nextLine().charAt(0);
This results in this output printing everything BUT the "Enter Here: " if you then give a char input it takes the input and then prints the previous line of code. I couldn't understand what was going on and thought I was losing my mind so when I copied the function over to a non-Maven file it executes exactly as expected. Allowing you to enter your input on the same line as the print statement. Has anyone seen this before and if they have how can I fix it? Admittedly this isn't a huge problem but it shouldn't be happening from what I can tell.
Output Image