Chapter TWO
Utilizing Java Object-Oriented Approach - Part 2


Exam Objectives

Understand variable scopes, apply encapsulation, and create immutable objects. Use local variable type inference.
Implement inheritance, including abstract and sealed types as well as record classes. Override methods, including that of the Object class. Implement polymorphism and differentiate between object type and reference type. Perform reference type casting, identify object types using the instanceof operator, and pattern matching with the instanceof operator and the switch construct.
Create and use interfaces, identify functional interfaces, and utilize private, static, and default interface methods.

Answers

1. The correct answer is C.

Explanation:

2. The correct answers are C and D.

Explanation:

3. The correct answers are B and D.

Explanation:

4. The correct answers are A and C.

Explanation:

5. The correct answers are A and C.

Explanation:

6. The correct answers are B and C.

Explanation:

7. The correct answer is A.

Explanation:

8. The correct answer is D.

Explanation:

9. The correct answers are A and B.

Explanation:

10. The correct answer is D.

Explanation:

11. The correct answer is E.

Explanation:

12. The correct answers are B and D.

Explanation:

13. The correct answer is A.

Explanation:

14. The correct answer is E.

Explanation:

15. The correct answers are A and E.

Explanation:

16. The correct answer is C.

Explanation:

Do you like what you read? Would you consider?


Do you have a problem or something to say?

Report an issue with the book

Contact me