1. How do you create a Reader object from an inputstream object?
a. use the static createReader() method of the inputstream class.
b. use the static createReader() method of the reader class
c. create an inputstreamreader object, passing the inputstream object as an argument to the inputstreamreader constructor(*)
d. create an outputstreamreader object, passing the inputstream object as an argument to the outputstreamreader constructor.
2. which of the following are valid identifiers?
a. _id(*)
b. $id(*)
c. #id
d. -id
3. which of the following are true?
a. the sleep() method puts a thread in the ready state.
b. the yield() method puts a thread in the waiting state.
c. the suspend() method is the preferred method for stopping a thread's execution.
d. a thread's interrupt() method results in the throwing of the interruptedexception.(*)
4. which of the following classes have a paint() method?
a. canvas(*)
b. image
c. frame(*)
d. graphics
5. which statement creates textarea with 10 rows and 20 columns?
a. new TextArea(10,20)(*)
b. new TextArea(20,10)
c. new TextArea(Rows(10),Cols(20))
d. new TextArea(Row(10),Col(20))
6. which of the following are true?
a. the AWT automatically causes a window to be repainted when a portion of a window has been minimized and then maximized.(*)
b. the AWT automatically causes a window to be repainted when a portion of a window has been covered and then uncovered.(*)
c. the AWT automatically causes a window to be repainted when application data is changed.
d. the AWT does not support repainting operations.
7. which of the following are java keywords?
a. null
b. NULL
c. extends(*)
d. main
8. which of the following thread state transitions are valid?
a. from ready to running(*)
b. from running to ready(*)
c. from running to waiting(*)
d. from waiting to running
e. from waiting to ready(*)
f. from ready to waiting
9. which of the following is not a wrapper class?
a. string(*)
b. integer
c. boolean
d. character
10. which is the advantage of encapsulation?
a. only public methods are needed
b. no exceptions need to be thrown from any method
c. making the class final causes no cnsequential changes to other code.
d. it changes the implementation without changing the interface and causes no consequential changes to other code.(*)
e. it changes the interface without changing the implementatino and causes no consequential changes to other code.
a. use the static createReader() method of the inputstream class.
b. use the static createReader() method of the reader class
c. create an inputstreamreader object, passing the inputstream object as an argument to the inputstreamreader constructor(*)
d. create an outputstreamreader object, passing the inputstream object as an argument to the outputstreamreader constructor.
2. which of the following are valid identifiers?
a. _id(*)
b. $id(*)
c. #id
d. -id
3. which of the following are true?
a. the sleep() method puts a thread in the ready state.
b. the yield() method puts a thread in the waiting state.
c. the suspend() method is the preferred method for stopping a thread's execution.
d. a thread's interrupt() method results in the throwing of the interruptedexception.(*)
4. which of the following classes have a paint() method?
a. canvas(*)
b. image
c. frame(*)
d. graphics
5. which statement creates textarea with 10 rows and 20 columns?
a. new TextArea(10,20)(*)
b. new TextArea(20,10)
c. new TextArea(Rows(10),Cols(20))
d. new TextArea(Row(10),Col(20))
6. which of the following are true?
a. the AWT automatically causes a window to be repainted when a portion of a window has been minimized and then maximized.(*)
b. the AWT automatically causes a window to be repainted when a portion of a window has been covered and then uncovered.(*)
c. the AWT automatically causes a window to be repainted when application data is changed.
d. the AWT does not support repainting operations.
7. which of the following are java keywords?
a. null
b. NULL
c. extends(*)
d. main
8. which of the following thread state transitions are valid?
a. from ready to running(*)
b. from running to ready(*)
c. from running to waiting(*)
d. from waiting to running
e. from waiting to ready(*)
f. from ready to waiting
9. which of the following is not a wrapper class?
a. string(*)
b. integer
c. boolean
d. character
10. which is the advantage of encapsulation?
a. only public methods are needed
b. no exceptions need to be thrown from any method
c. making the class final causes no cnsequential changes to other code.
d. it changes the implementation without changing the interface and causes no consequential changes to other code.(*)
e. it changes the interface without changing the implementatino and causes no consequential changes to other code.
No comments:
Post a Comment