title: How to write method which performs when user presses only Enter?
body: <p>I want to write infinity while statement which will perform every time when user just presses <code>Enter</code>. Every stream readers I know perform when user enteres anything into console or presses <code>Enter</code> twice.</p>
  
  <hr>
  
  <p>I want to write something like this:</p>
  
  <blockquote>
    <p>Console: <br>
    output 1 [enter have been pressed onse] <br>
    output 2 [enter have been pressed onse] <br>
    output 3 [enter have been pressed onse] <br>
    [so on...]</p>
  </blockquote>
  
  <p>This is my current code:</p>
  
  <pre><code>addQuestionsInArray();
  
  Random r = new Random();
  DataInputStream is = new DataInputStream(System.in);
  while (true) {
      String question = questionsList.get(r.nextInt(questionsList.size()));
      System.out.println(question);
      if (String.valueOf(is.readInt()).equals("0")) {
          break;
      }
  }
  </code></pre>