When using read() from BufferedReader, when I press enter after typing input, the first input is taken but the next input statement is also executed, before I can type input for the next statement.
char c = (char)br.read();
String S = br.readLine();
If I type a character and press enter, then c stores that character but S stores "" and it does not ask me to input S. It's as if Java automatically presses enter for the string input.
Can someone explain this behaviour?