0

What is the main difference between classes and objects??

31st Aug 2018, 11:53 PM
Isiaq Abdulrahman
Isiaq Abdulrahman - avatar
3 Réponses
+ 6
Collection of objects can be called as CLASS. For example: if Fruit is a class then the objects of that fruit class will be apple,orange,banana,grapes nd so on.. Class describes the object or we can called class as blueprint for an object.
27th Sep 2018, 7:57 AM
Winget
Winget - avatar
+ 1
Class is a blueprint, template, pattern. It defines what will the object of that class contain (functions and attributes). You create an object based on a class. When object is created, you can execute those functions on it. The same class might serve as a blueprint for many objects. Try to practise it and it will become more clear to you.
1st Sep 2018, 12:21 AM
Steppenwolf
Steppenwolf - avatar