Answer: multi-thread : Questions « Thread « SCJP
Java Source And Data Type
Variables may not be
How to prevent shared data from being corrupted in a multithreaded environment?
How can you ensure that multithreaded code does not deadlock?
Answer: thread and deadlock
When you declare synchronized code, you can specify the object on whose lock the block should synchronize.
How to create a thread?
Answer: thread creation
The Runnable interface declares which methods?
Answer: methods in Runnable interface
t implements Runnable interface, which Thread method to call to execute it as a separate thread?
Answer: start method
Which of the following are thread states?
Answer: thread status
Which of the following thread state transitions are valid?
Answer: thread state transitions
What is the result of this code?
What is the output(sleeping thread)?
Answer: sleeping thread
What is the result of trying to compile and run this program?
Answer: synchronized block
The notifyAll() method must be called from a synchronized context(True/False)
To call wait(), an object must own the lock on the thread(True/False)
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.