nerdexam
Oracle

1Z0-809 · Question #223

1Z0-809 Question #223: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #223. The question stem and answer options stay visible for context.

Question

Given the definition of the Book class: public class Book { private int id; private String name; public Book(int id, String name) {this.id = id; this.name = name;} public int getId() { return id; } public String getName() { return name; } public void setId(int id) { this.id = id; } public void setName(String name) { this.name = name; } } Which statement is true about the Book class?

Options

  • AIt demonstrates encapsulation.
  • BIt is defined using the factory design pattern.
  • CIt is defined using the singleton design pattern.
  • DIt demonstrates polymorphism.

Unlock 1Z0-809 to see the answer

You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-809 Practice