What is Class & Object in OOP?


Question: What is Class & Object in OOP?
  
Answer :                           
Class: A class act as a blue print that defines the properties, state and behavior that are common to a no of Objects.


Object: Object is an instance of the class. An Object is an entity that has Attribute, Behavior, and Identity. Attribute and behavior of an object are defined by the class definition.

Example: Mobile is class. Nokia, Samsung, Apple is an object of that class.


Comments

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???