I have a BufferedReader waiting for input, but for some reason it doesn't wait for the second read and continues to print my third print statement.
Code:
BufferedReader inFromUser =new BufferedReader(new InputStreamReader(System.in));
char letter,xVal;
int yVal;
System.out.println("Please enter a letter for your word.(a-z)");
letter=(char)inFromUser.read();
System.out.println("Please enter a X location for this piece.(A-J)");
xVal=(char)inFromUser.read();
System.out.println("Please enter a Y location for this piece.(0-9)");
yVal=inFromUser.read();
Example execution goes as follows: Please enter a letter for your word. //Waits on input here
a
Please enter a X location for this piece. //Doesn't wait here???
Please enter a Y location for this piece.