Encapsulation is a programming technique that allows you to hide the implementation details of a class from the rest of the program. This allows you to change the implementation of the class without affecting the rest of the program.