Welcome Guest | Sign in | Register
Abstract - Discussion Page For Q.2510 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Abstract > Questions and Answers

Q:
Which two classes correctly implement both the java.lang.Runnable and the java.lang.
Cloneable interfaces? (Choose two.)

A. public class Session implements Runnable, Cloneable {
public void run();
public Object clone();
}

B. public class Session
extends Runnable, Cloneable {
public void run() { /* do something */ }
public Object clone() { /* make a copy */ }

C. public class Session
implements Runnable, Cloneable {
public void run() { /* do something */ }
public Object clone() { /* make a copy */ }

D. public abstract class Session
implements Runnable, Cloneable {
public void run() { /* do something */ }
public Object clone() { /*make a copy */ }

E. public class Session
implements Runnable, implements Cloneable {
public void run() { /* do something */ }
public Object clone() { /* make a copy */ }
A. AB B. CD
C. AD D. CD

Answer and Explanation

Answer:CD

Explanation:
ANS C and D is correct because these two class implemented interface properly and these two class implemented the methods which exisit in Runnable and Clonable interface

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.