Instance Variables:Instance variables are used to store and represent an object's state. They hold the data that defines the characteristics and properties of an object.
Getter and Setter Methods: Getter methods retrieve the values of instance variables, allowing access to an object's state. Setter methods modify or update the values of instance variables.
Encapsulation:Encapsulation is a principle in OOP that combines data (instance variables) and behavior (methods) into a single unit called an object. It ensures that an object's state is accessed and modified through defined methods.