Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.801 :

Posted: Mon Jan 17, 2011 1:53 pm
by ETS User
Identify correct statements about java.io.Console class?

"You can read as well as write only character data from/to it." -- is selected as the correct answer.

for the readLine method, the API states:
"Returns:
A string containing the line read from the console, not including any line-termination characters, or null if an end of stream has been reached.

So when you say
only character data
, are you referring to characters that make up a String?

Thank you
Gary

Re: About Question com.enthuware.ets.scjp.v6.2.801 :

Posted: Tue Jan 18, 2011 6:54 pm
by admin
Well, the characters captured by the Console are returned by readLine() as a String object.