Page 1 of 1

About Question enthuware.ocpjp.v7.2.1251 :

Posted: Wed Aug 27, 2014 7:50 am
by a325974
Type A implements method process().
Both interface and abstract class can implement methods. Interface can do it by default method. So, I think, that correct answer is "A may be an abstract class or an interface.". Why not?

Re: About Question enthuware.ocpjp.v7.2.1251 :

Posted: Wed Aug 27, 2014 7:57 am
by admin
Interface cannot implement anything. Remember that this exam is for Java 7.

HTH,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1251 :

Posted: Sat Nov 15, 2014 11:16 pm
by Varior
A must implement an interface. - isn't it true? Type A implements method process(). Or it can be impemented from another abstract class?

Re: About Question enthuware.ocpjp.v7.2.1251 :

Posted: Sat Nov 15, 2014 11:37 pm
by admin
Implementing a method doesn't mean implementing an interface. It just means that the class has a non-abstract method. In other words, the class has proper working code for that method. Whether that method is a part of some other interface or abstract class is irrelevant.

HTH,
Paul.

Re: About Question enthuware.ocpjp.v7.2.1251 :

Posted: Sun Nov 16, 2014 8:31 pm
by Varior
Thanks, Paul!