System.in.read() does not block to read more input characters?
<p><br />
Can anyone please explain why the following code behaving strangely: </p>

<pre><code>public class UserInputTest {
    public static void main(String[] args) throws IOException {
        int n=3;
        char[] arr = new char[n];
        for (int i=0; i&lt;n; i++) {
          System.out.println(i+1 + " character :");
          arr[i] = ((char)System.in.read());
        }

        System.out.println("You Entered : ");
        for (int i=0; i&lt;n; i++) {
         System.out.println(arr[i]);
        }
    }
}
</code></pre>

<p><strong>OUTPUT:</strong>
<br/>
1 character :<br/>
u<br/>
2 character :<br/>
3 character :<br/>
You Entered : <br/>
u<br/></p>

<p>I was expecting it to block three times for a user to input values.
Any comments ?</p>

<p><br/><br/>
Thanks,<br/>
Mohit</p>
