Question OOP-ENC-0001
EasyWhat is encapsulation?
- A.
Inheriting from several classes
- B.
Having many forms of one method
- C.
Show answer and explanation
Answer: D
A class exposes a public interface while keeping its fields private.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
What is encapsulation?
Inheriting from several classes
Having many forms of one method
Answer: D
A class exposes a public interface while keeping its fields private.
Breaking a program into files
Bundling data and the methods that act on it into one unit, and hiding the internal details