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

Home > Java Programming > Interface > Questions and Answers

Q: Interface writeable {}

Interface Erasable{}

Which three are valid?
A. a) Public class pencile extends writeable{}

c) Public interface pencile extends writeable{}

e) Public class pencile implements writeable, erasable{}
B. b) Public class pencile implements writeable{}

c) Public interface pencile extends writeable{}

e) Public class pencile implements writeable, erasable{}
C. a) Public class pencile extends writeable{}

c) Public interface pencile extends writeable{}

d) Public interface pencile implements writeable{}
D. c) Public interface pencile extends writeable{}

d) Public interface pencile implements writeable{}

e) Public class pencile implements writeable, erasable{}

Answer and Explanation

Answer:b) Public class pencile implements writeable{}

c) Public interface pencile extends writeable{}

e) Public class pencile implements writeable, erasable{}

Explanation:
a class can not extend interface ,it can only implement.So ans a) is not correct
An interface can extend another interface it shouldn’t implement another interface so ans d) is also wrong rest is correct 

Comment on this Question

Name:

Loading...




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