Encapsulation means combining the properties of class and methods in a single unit. It helps the programmer to follow the modular approach for software development. Each object has its own property and methods and works independently of other objects. It also serves the purpose of data hiding.