title: System.console() gives a NullPointerException in NetBeans
body: <p>I have the following problem: method <code>readLine()</code> or <code>nextLine()</code>, <code>nextInt()</code>, etc. throw an exception: <code>NullPointerException</code>.</p>
  <p>I use the <a href="https://en.wikipedia.org/wiki/NetBeans" rel="nofollow noreferrer">NetBeans</a> IDE (if it matters).</p>
  <pre><code>public static void Reading()
  {
      String qq;
      qq = System.console().readLine();
      System.console().printf(qq);
  }
  </code></pre>