exam questions

Exam 1z0-829 All Questions

View all questions & answers for the 1z0-829 exam

Exam 1z0-829 topic 1 question 37 discussion

Actual exam question from Oracle's 1z0-829
Question #: 37
Topic #: 1
[All 1z0-829 Questions]

Given the directory structure:

Given the definition of the Doc class:

Which two are valid definitions of the WordDoc class? (Choose two.)

  • A. package p1.p2;
    public non-sealed class WordDoc extends Doc { }
  • B. package p1;
    public final class WordDoc extends Doc {}
  • C. package p1;
    non-sealed abstract class WordDoc extends Doc {}
  • D. package p1.p2:
    public sealed class WordDoc extends Doc { }
  • E. package p1;
    public class WordDoc extends Doc {}
  • F. package p1;
    public non-sealed class WordDoc extends Doc {}
Show Suggested Answer Hide Answer
Suggested Answer: BF 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SrinivasJasti
2 weeks, 1 day ago
Selected Answer: BF
A and D ---> incorrect WordDoc is not in the same package as Doc.C ---->incorrect, Does not have public or final, E---> incorrect,WordDoc must declare itself as final, sealed, or non-sealed when extending a sealed class
upvoted 1 times
...
supersquax
5 months, 2 weeks ago
A wrong cuz "package p1.p2" doesnt make sense B correct C wrong cuz no access modifier is more restrictive than public and not allowed. D wrong cuz when using "sealed", one must also use "permits" E wrong cuz missing "sealed", "non-sealed", or "final" F correct.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago