What is the primary benefit of encapsulation in object-oriented programming?
Answer options
A
It makes programs run faster
B
It hides internal implementation details and protects data integrity
C
It allows multiple inheritance
D
It eliminates the need for constructors
Correct answer: It hides internal implementation details and protects data integrity
Explanation
Quick AnswerThe correct answer is It hides internal implementation details and protects data integrity because it directly addresses the core logic of Java Programming.
This question has been retained as-is due to its unique context.