• +91 9723535972
  • info@interviewmaterial.com

OOP Interview Questions and Answers

Question - What is the difference between a class and an object?

Answer -

Object

Class

A real-world entity which is an instance of a class

A class is basically a template or a blueprint within which objects can be created

An object acts like a variable of the class

Binds methods and data together into a single unit

An object is a physical entity

A class is a logical entity

Objects take memory space when they are created

A class does not take memory space when created

Objects can be declared as and when required

Classes are declared just once

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners