Frage im Vorstellungsgespräch bei FDM Group

Difference between class and objects, use an example to differentiate

Antwort im Vorstellungsgespräch

Anonym

17. Okt. 2018

A class is a blueprint if the variables and behaviours of an object An object is an instance of a class E.g a class holds the bar colour for a dog and a method bark that describe how the dog barks A dog is a single instance of the class Dog and has a colour and barks