Practice mode Java

Which OOP concept bundles data and methods in a class while hiding internal details through private fields?

Correct answer C. Encapsulation

Explanation

Encapsulation keeps fields private and exposes them only through methods such as getters and setters, protecting the object's internal state.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.