Pergunta de entrevista da empresa Capital One

What is the difference between an object and a class?

Respostas da entrevista

Sigiloso

10 de dez. de 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

Sigiloso

27 de set. de 2015

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