About Question enthuware.ocpjp.v17.2.3688

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

Moderator: admin

Post Reply
samsonwilliams
Posts: 1
Joined: Sun Apr 21, 2024 10:38 pm
Contact:

About Question enthuware.ocpjp.v17.2.3688

Post by samsonwilliams »

Why the option "Making the Book class extend Document will eliminate all compilation errors." is correct?

1 - "sealed class Document implements Readable permits Book{ " there is no problem here, the trouble come from "non-sealed class Book implements Readable { }" because this last one "no extends the sealed class THAT permits it.

Am I wrong?

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

Re: About Question enthuware.ocpjp.v17.2.3688

Post by admin »

>Why the option "Making the Book class extend Document will eliminate all compilation errors." is correct?
Because it does fix the compilation errors in the code as given. Did you try it?


>1 - "sealed class Document implements Readable permits Book{ " there is no problem here, the trouble come from "non-sealed class Book implements Readable { }" because this last one "no extends the sealed class THAT permits it.

Correct. That is why the option is asking you to make the Book class extend Document. i.e.:

non-sealed class Book extends Document implements Readable{ }
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 17 guests