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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ETS User

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

Post 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

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Well, the characters captured by the Console are returned by readLine() as a String object.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 63 guests