employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged Employer

Tata Consultancy Services Interview Question

Difference between class and object

Interview Answer

Anonymous

Jul 25, 2024

Class is a accumulation of objects, class is declared once and after that various objects can be called under it, it does not take space in the memory and object is the entity containing information, features and functions of the data by the user, it is also called instance of a class, it does take space in the memory. Example of class: fruits Example of object: apple, banana, grapes.