About Question enthuware.ocpjp.i.v11.2.3047 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
zunayeed
Posts: 10
Joined: Fri Jun 28, 2019 10:58 am
Contact:

About Question enthuware.ocpjp.i.v11.2.3047 :

Post by zunayeed »

In one of the wrong options, it is given like
B must not be final.
Explanation: Since B must be a sub type of A, A cannot be final.
I understand, A can not be final. Does it mean B must not be final ? Can you please explain this part ?

As far as I know, though a final class cannot be extended, it can extend other classes. In simpler words, a final class can be a sub class but not a super class.
Thank you.

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

Re: About Question enthuware.ocpjp.i.v11.2.3047 :

Post by admin »

Your understanding is correct. So what is the problem? B is a subclass. It may or may not be final. That is why it is a wrong option.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests