What is an Object?
An object is an instance of a class. It contains real values instead of variables. For example, let us create an instance of the class Employee called “John”.
Employee John= new Employee(); Now we can access all the methods in the class “Employee” via object “John” as shown below. John.setName(“XYZ”);