Console provides means to input from and output to the standard character-oriented terminal of the operating system, which are collectively called standard input/ouput. If the standard IO has been redirected externally to the script engine, this class will be affected as well, so technically it's not tied to the console per se.
Parent Class
Type | Name | Signature |
---|---|---|
method S | error | public static void error(var) |
method S | errorln | public static void errorln(var) |
method S | public static void print(var) | |
method S | println | public static void println(var) |
method S | readln | public static String readln() |
public static void error(var value)
Print the given value to the standard error, which is by default output to the console as well. If the value is an Object, calls Object.toString() to get the string to output. If the value is of primitive type, prints its literal representation. If the value is null, prints "(null)" (quotes excluded).
Parameters
public static void errorln(var value)
Print the given value, converted to String, to the standard error, then a line break sequence as defined by the underlying operating system. The standard error is by default output to the console as well. See toString() for more details.
Parameters
public static void print(var value)
Print the given value to the console. If the value is an Object, calls Object.toString() to get the string to output. If the value is of primitive type, prints its literal representation. If the value is null, prints "(null)" (quotes excluded).
Parameters
public static void println(var value)
Print the given value, converted to String, to the console, then a line break sequence as defined by the underlying operating system. See toString() for more details.
Parameters
public static String readln()
Read the characters from standard input, until a line break sequence as defined by the underlying operating system is met. This method will be blocking the thread until the line break is consumed.
Required Policies
System.Console/read
Returns