READ Free Dumps For Oracle- 1z0-851
Question ID 22656 | Given: 10. } |
Option A | Compilation fails. |
Option B | An exception is thrown at runtime. |
Option C | Synchronizing the run() method would make the class thread-safe. |
Option D | The data in variable "x" are protected from concurrent access problems. |
Option E | Declaring the doThings() method as static would make the class thread-safe. |
Option F | Wrapping the statements within doThings() in a synchronized(new Object()) { } block would make the class thread-safe. |
Correct Answer | E |
Question ID 22657 | Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.) |
Option A | new Thread() { |
Option B | new Thread() { |
Option C | new Thread() { |
Option D | new Thread() { |
Option E | new Thread(new Runnable() { |
Option F | new Thread(new Runnable() { |
Correct Answer | D,F |