Programming with Passion

Make the best out of everything.

Friday, 8 April 2016

What is an Object/Instance?

What is an Object/Instance?
Object is the instance of a class, which is concrete. From the above example, we can create instance of class Vehicle as given below
  1. Vehicle vehicleObject;
We can have different objects of the class Vehicle, for example we can have Vehicle objects with 2 tyres, 4tyres etc. Similarly different engine capacities as well.

No comments:

Post a Comment