GIAC
GSSP-JAVA · Question #97
Which of the following classes implements the java.lang.Cloneable and java.lang.Runnable interfaces correctly?
The correct answer is B. public class PrintData implements Runnable, Cloneable { public void run() { /* some code. See the full explanation below for the reasoning.
Question
Which of the following classes implements the java.lang.Cloneable and java.lang.Runnable interfaces correctly?
Options
- Apublic class DemoThread implements Runnable, Cloneable { public void run() { /* some
- Bpublic class PrintData implements Runnable, Cloneable { public void run() { /* some code
- Cpublic class CloneCheck implements Runnable, Cloneable { public int run() { /* some code
- Dpublic class Demo implements Runnable, Cloneable {
How the community answered
(35 responses)- A3% (1)
- B77% (27)
- C9% (3)
- D11% (4)
Community Discussion
No community discussion yet for this question.