Page 1 of 1

About Question enthuware.ocpjp.v8.2.1251 :

Posted: Tue Jul 12, 2016 10:54 am
by RAZER-KIEV
What does it means in exploration
"Further, it is given that A declares a method but does not implement it, that means, it MUST be an abstract class.
"
Interfaces, of course, can declare a method but doesn't implement it.

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

Posted: Tue Jul 12, 2016 11:00 am
by admin
You are right and that is what the explanation also says, "Since Java 8 allows interfaces to contain method implementation as well, that means it can be a class or an interface. ".
The second sentence is incorrect. I think the author meant that if it is a class, it must be an abstract class. I have updated it.
thank you for your feedback!
Paul.

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

Posted: Mon Aug 01, 2016 7:21 am
by badbishop
Without knowing whether A implements either {default|static} process(){}, or just process(){}, it is impossible to tell, can A also be an interface or not. IMHO, the most natural assumption would be process(){}. But, of course, that will spell the answer out in the question itself.

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

Posted: Mon Aug 01, 2016 8:26 pm
by admin
That is correct. You cannot be sure whether it is an interface or not by just process. That is why the correct option is "interface or abstract class".
thank you for your feedback!