Chapter TWO
Utilizing Java Object-Oriented Approach - Part 2


Exam Objectives

Understand variable scopes, use local variable type inference, apply encapsulation, and make objects immutable.
Implement inheritance, including abstract and sealed classes. Override methods, including that of Object class. Implement polymorphism and differentiate object type versus reference type. Perform type casting, identify object types using instanceof operator and pattern matching.
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