Thursday, August 26, 2010

Console

Courtesy of Sun Web Learning Center


Which two are true about the java.io.Console class? (Choose two.)


A Only a single instance exists for a given JVM.
B All of the methods that read user input return a String.
C All of the methods that read user input return a char[].
D All of the methods that read user input are synchronized.
E All of the methods that read user input require the developer to add code to echo the users keystrokes.

A and D are correct. B, C, and E are true only for some of the class's methods.

No comments:

Post a Comment