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?
Console c = System.console();
Is c
null?
Doc:
public static Console console()
Returns the unique Console object associated with the current Java virtual machine, if any.
Returns: The system console, if any, otherwise null.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With