What is Encapsulation?

Encapsulation means combining data and functions into a single unit. In Object oriented programming, encapsulation is implemented by Class. Encapsulation is used to implement Data hiding (Infromation Hiding). Class consists of both the data and functions. For example: Student class combines data like(roll _no, name, class, address) and functions(input() and show()) into a single unit.

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.