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