Console Class Flashcards
Returns the reader object associated with this Console object. Can perform read operations through this returned reference.
Reader reader()
Returns the PrintWriter object associated with this Console object. can perform write operations through this returned reference.
PrintWriter writer()
Reads a line of text String( and this returned string does not include any line termination characters). Returns null if fails.
String readLine()
Same as the readLine() method but first prints the string fmt.
String readLine(String fmt, Object… args)
Reads a password text and returns as char array, echoing is disabled with this method.
char[] readPassword()
Same as readPassword() method but first prints the string fmt.
char[] readPassword(String fmt, Object… args)
Writes the formatted string(created based on the values of fmt string and args passed) to the console.
Console format(String fmt, Object…. args)
Same as format, but provided as a convenience to C/C++ programmers.
Console printf(String fmt, Object… args)
Flushes any data still remaining to be printed in the console object’s buffer.
void flush()