Oracle Certified Professional Java Se 8 Programmer · Free Practice Question Easy

Question 41

Given code: 

What is the result?

  • A Some text containing @ symbol
  • B Compilation error for Test class
  • C Compilation error for Printer class
Reveal correct answer

Correct answer: C

Explanation

For bounds, extends keyword is used for both class and interface.


Correct declaration of Printer class should be:

class Printer<T extends Cloneable> {}

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need