Page 1 of 1

About Question enthuware.ocajp.i.v7.2.1283 :

Posted: Thu Oct 16, 2014 4:35 am
by Daniel Clinton
Option 1:

Code: Select all

public void add();
couldn't this be considered a correct answer (as a declaration in an interface)?

Re: About Question enthuware.ocajp.i.v7.2.1283 :

Posted: Thu Oct 16, 2014 8:20 am
by admin
Yes, but the question is asking about class.

Re: About Question enthuware.ocajp.i.v7.2.1283 :

Posted: Thu Oct 16, 2014 9:43 am
by Daniel Clinton
Hi Paul,
Thanks for your response.
I don't follow though.
I'm still unclear why option 1 and 5 are not both valid.
Maybe you can show me where my reasoning is going askew.
Me: Couldn't this be considered a correct answer (as a declaration in an interface)?
Admin: Yes, but the question is asking about class.
I don't see where though?
I do see accessible to any class, but meaning public access from other classes, yeah?
What is the correct declaration for an abstract method 'add' accessible to any class, takes no arguments and returns nothing?
The question seeks a correct declaration for:
  • an abstract method
    named 'add'
    is accessible to any class
    takes no arguments
    returns nothing
Where does option 1 not qualify?

Re: About Question enthuware.ocajp.i.v7.2.1283 :

Posted: Thu Oct 16, 2014 7:06 pm
by admin
You are right. I misread the question. It should say in a class. Fixed.
thank you for your feedback!