nerdexam
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)
  • A
    3% (1)
  • B
    77% (27)
  • C
    9% (3)
  • D
    11% (4)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice