Java Programming
primer-original-v2easyJavaOOPEncapsulationprimer-original-v2

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.

Related Java Programming questions

Practice more Java Programming questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.