What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?

What is the name of the Java concept that uses access modifiers to protect variables and
hide them within a class?

What is the name of the Java concept that uses access modifiers to protect variables and
hide them within a class?

A.
Polymorphism

B.
Instantiation

C.
Encapsulation

D.
Inheritance

E.
Abstraction



Leave a Reply 4

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


Birendra

Birendra

Answer is C: As Encapsulation says, protecting Class variables using assess modifier to direct access.

Jessy

Jessy

Answer: C.Encapsulation