NullPointerException in Console's readLine()

Posted by dmindreader on Stack Overflow See other posts from Stack Overflow or by dmindreader
Published on 2009-12-16T22:34:47Z Indexed on 2010/06/13 6:22 UTC
Read the original article Hit count: 221

Filed under:
|

This:

Console c = System.console();
        String readline;
        String u = c.readLine("%s", "args");

Throws a NullPointerException. Yet the signature of the method is:

 public String readLine(String fmt, Object... args)

Why's this exception being thrown?

© Stack Overflow or respective owner

Related posts about java

Related posts about console