Exit Java Concurrency and Multithreading Post Test Default Section Question Title * 1. Which of the following is NOT a valid Thread state? BLOCKED STOPPED NEW RUNNABLE Do Not Know Question Title * 2. Which of the following is NOT a property of a Thread? An Identifier of type long A Name of type String A Priority of type int A Status of type Enum Do not know Question Title * 3. Which is the following is the correct effect of using the volatile keyword? The current Thread should store a copy of this variable in it local storage The current Thread should not cache this variable, but always read it from main memory The current Thread should compare it’s cached copy with the original copy in main memory The current Thread must apply a lock to this variable before accessing it Do not know Question Title * 4. Which of the following statement will wake up the Last Thread in the wait queue? notify(int threadId) notify() notifyAll() None of the above Do not know Question Title * 5. A User Thread can be converted to a Deamon Thread True False Do not know Question Title * 6. Which of the following is the correct method to find if the current Thread holds a lock on a specific Object? Thread.holdsLock(object) Object.isLocked(Thread.currentThread()) Lock.isHeld(objext, Thread.currentThread() Object.lockedBy(Thread.currentThread()) Do not know Question Title * 7. This statement is atomic: x++ True False Do not know Question Title * 8. Which of the following is required to define an immutable class? All fields should be final and private There should not be any setter methods The class should be declared final All the above Do not know Question Title * 9. Which interface allows submitting of Callable instances? Executor ExecutorService Runtime Runnable Do not know Question Title * 10. What is correct technique to stop a Thread? A boolean flag set by an external Thread and checked within the current Thread Invoke thread.interrupt() Invoke thread.stop() Invoke thread.join() Do not know Done