Which two statements are true?

Which two statements are true?

Which two statements are true?

A.
An abstract class can implement an interface.

B.
An abstract class can be extended by an interface.

C.
An interface CANNOT be extended by another interface.

D.
An interface can be extended by an abstract class.

E.
An abstract class can be extended by a concrete class.

F.
An abstract class CANNOT be extended by an abstract class.

Explanation:

E: When an abstract class is subclassed, the subclass usually provides implementations for all of the
abstract methods in its parent class.
Incorrect answers:

F: When an abstract class is subclassed, the subclass usually provides implementations for all of the
abstract methods in its parent class. However, if it does not, the subclass must also be declared
abstract.
Reference: http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html



Leave a Reply 6

Your email address will not be published. Required fields are marked *


S

S

I agree with A,E

sully

sully

I’d go with A & E aswell

Ahmed Galal

Ahmed Galal

you are right

Oene Bakker

Oene Bakker

A is correct
B is not correct: a interface can not be the superclass of the abstract class
C is not correct: a interfaces can be extended by other interfaces
D is not correct: a abstract class can not be a superinterface of a interface
E is correct
F is not correct (because E is)

So I go for A and E