Capital One Interview Question

What is the difference between an object and a class?

Interview Answers

Anonymous

Dec 10, 2018

An object is an instance of a class. The class can be considered a blueprint or template for creating objects from that class. There can be many objects that come from a single class. But there can only be one class definition. You might have a class named Books. With objects created from the class Books called, hungerGames, harryPotter, and readyPlayerOne.

3

Anonymous

Sep 27, 2015

An object is used to hold data, while a class can have methods and functions and perform operations within itself.