Question d’entretien chez Capital One

What is the difference between an object and a class?

Réponses aux questions d'entretien

Utilisateur anonyme

10 déc. 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

Utilisateur anonyme

27 sept. 2015

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