hiexam
oracle · 1z0-829 · Q604 · multiple_choice · topic_1

Given the code fragment: //IMG// Which set of class definitions compiles?

Given the code fragment: //IMG// Which set of class definitions compiles?
  • A.interface Story extends SInt {} interface Art extends SInt {}
  • B.public interface Story extends SInt {} public interface Art extends SInt {}
  • C.sealed interface Story extends SInt {} non-sealed class Art implements SInt {}
  • D.non-sealed interface Story extends SInt {} non-sealed interface Art extends SInt {}
  • E.non-sealed interface Story extends SInt {} class Art implements SInt {}
Explanation
Right option is D.

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.