๐Ÿ’ปap computer science a review

Encapsulation

Written by the Fiveable Content Team โ€ข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโ€ขWritten by the Fiveable Content Team โ€ข Last updated September 2025

Definition

Encapsulation refers to the bundling of data and methods within a class, where the data is hidden from external access. It ensures that an object's internal state remains consistent by controlling how it can be accessed or modified.

"Encapsulation" also found in: