About Question enthuware.ocajp.i.v8.2.1481

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
shear12345
Posts: 18
Joined: Wed Feb 12, 2025 4:56 pm

About Question enthuware.ocajp.i.v8.2.1481

Post by shear12345 »

The correct answer to this question does not specify an access modifier; whereas the method in the super does. This is what tripped me up, because I avoided the correct answer; with my line of thinking being that you can't change the access to more restrictive when overriding. However, since we are dealing with interfaces here, the default access when not specified is public. I think it is important to point this out in the explanation of why this is the correct answer. Just thought I'd share my input.

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

Re: About Question enthuware.ocajp.i.v8.2.1481

Post by admin »

Good point. Should be added in the explanation.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests