wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "interface" Watch "interface" New topic
Author

interface

Aru
Ranch Hand

Joined: Jul 20, 2000
Posts: 112
Hi all,
This question is from a Mock Test.
Which of the following is true ?
a. Subclasses must define all the methods that the superclass defines.
b. A class must define all the methods in the interface that it says it implements.
c. A class can't override the super class's constructor.
d. It is possible for 2 classes to be superclass of each other.
e. An interface can implement multiple interfaces.
My answers were ....
a. False.
b. True // Note
c. True
d. False never. ClassCircularityError occurs
e. False it can only extend multiple interface

But the test says the right answer is only c.
I think this is true
b. A class must define all the methods in the interface that it says it implements.

Aruna.
[This message has been edited by Aru (edited August 31, 2000).]
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
unless it is declared as abstract...


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Frank Wang
Greenhorn

Joined: Aug 18, 2000
Posts: 25
Hi, Aruna, no, the only answer is C.
Answer b(A class must define all the methods in the interface that it says it implements) is wrong because a class does not implement all the methods in an interface. In this case this class is an abstract class, must be declared as abastract.
With regards!
Frank
Aru
Ranch Hand

Joined: Jul 20, 2000
Posts: 112
Thx , Yes..unless it is abstract.
Aruna
 
GeeCON Prague 2014
 
subject: interface