title: Console console = System.console(); gives null
body: <p>I have to use <code>Console console = System.console();</code> to enter password via console in Eclipse, but it always
  gives me <code>java.lang.NullPointerException</code>. Why is it so?</p>
  
  <p>or there is any other way available by which we can enter password via console which is not visible??</p>