Console Class Flashcards

1
Q

Returns the reader object associated with this Console object. Can perform read operations through this returned reference.

A

Reader reader()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Returns the PrintWriter object associated with this Console object. can perform write operations through this returned reference.

A

PrintWriter writer()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Reads a line of text String( and this returned string does not include any line termination characters). Returns null if fails.

A

String readLine()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Same as the readLine() method but first prints the string fmt.

A

String readLine(String fmt, Object… args)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Reads a password text and returns as char array, echoing is disabled with this method.

A

char[] readPassword()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Same as readPassword() method but first prints the string fmt.

A

char[] readPassword(String fmt, Object… args)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Writes the formatted string(created based on the values of fmt string and args passed) to the console.

A

Console format(String fmt, Object…. args)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Same as format, but provided as a convenience to C/C++ programmers.

A

Console printf(String fmt, Object… args)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Flushes any data still remaining to be printed in the console object’s buffer.

A

void flush()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly