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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Daniel Clinton
Posts: 29
Joined: Fri Aug 08, 2014 11:22 am
Contact:

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

Post 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)?

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Yes, but the question is asking about class.

Daniel Clinton
Posts: 29
Joined: Fri Aug 08, 2014 11:22 am
Contact:

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

Post 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?

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. I misread the question. It should say in a class. Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests