Page 1 of 1
About Question enthuware.ocajp.i.v8.2.1283 :
Posted: Sat Dec 02, 2017 3:59 pm
by Rinkesh
The option 5 would have been valid even if we don't write throws Exception?
Re: About Question enthuware.ocajp.i.v8.2.1283 :
Posted: Sat Dec 02, 2017 7:29 pm
by admin
What happened when you tried it out?
Re: About Question enthuware.ocajp.i.v8.2.1283 :
Posted: Sat Sep 21, 2024 7:44 am
by nkaragulov
The first option could have been true?
public void add();
because methods declared in an interface have implicit abstract declaration in it.
I think the question could have been more precise.
Re: About Question enthuware.ocajp.i.v8.2.1283 :
Posted: Sat Sep 21, 2024 8:26 am
by admin
It is quite precise because the problem statement clearly says, "What is the correct declaration for an abstract method 'add' in a class...". So there is no possibility of an interface here.