Card 3 / 125: What does encapsulation mean?
A)
Encapsulation is a measure of how a class or a module is dependent on another class or module
B)
Encapsulation means hiding the attributes of a class by marking them private and restrict accessing them through public methods
C)
Encapsulation means hiding the constructors of a class by marking them private and enable constructing objects through one public method
D)
Encapsulation means hiding the internal implementation and representation of an object and provide to the outer world only an interface of public methods to access the object
Answer:
B) Encapsulation means hiding the attributes of a class by marking them private and restrict accessing them through public methods
D) Encapsulation means hiding the internal implementation and representation of an object and provide to the outer world only an interface of public methods to access the object
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |