Dear guys,
please spare sometime and help me with these questions:
#1. Given a TextArea using a proportional pitch font and constructed like this:
TextArea t = new TextArea("12345", 5, 5);
Which statement is true?
A. The displayed width shows exactly five characters on each line unless otherwise constrained.
B. The displayed height is five lines unless otherwise constrained.
C. The maximum number of characters in a line will be five.
D. The user will be able to edit the character
string.
E. The displayed string can use multiple fonts.
Answers given:B, D
IMHO: Heeeeeeeeeeelppppppppppppp!!!
#2. FilterInputStream is the parent class for BufferedInputStream and DataInputStream. Which classes are a valid argument for the constructor of a FilterInputStream?
A. File
B. InputStream
C. OutputStream
D. FileInputStream
E. RandomAccessFile
Answer given: B
IMHO: B, D
#3. What might cause the current
thread to stop executing.
A. An InterruptedException is thrown.
B. The thread executes a wait() call.
C. The thread constructs a new Thread.
D. A thread of higher priority becomes ready.
E. The thread executes a waitforID() call on a MediaTracker.
Answer given: B, D, E
IMHO: B, C (the wording of the question says MIGHT, so imagine a scenario where a thread spawns a new thread and assigns it a priority higher than itself !!!), D, E
#4. What is true about threads that stop executing?
A. When a running thread's suspend() method is called, then it is possible for the thread to indefinitely remain suspended.
B. The interpreter stops when the main method stops.
C. A thread can stop executing when another thread is in a runnable state.
Answer given: C
IMHO: A, B (The main method should be last to finish or else the system may hang), C
BTW, I find the wording of many a questions in online mock testsvery ambigous. I suppose this is not the case in the real thing. Can a experienced hand clarify (and pacify!!!)
Thanx in adv.
Sanjeev