0
Difference between class and object?
6 ответов
+ 11
A class is what defines an object - what data it has (fields and properties) and what it can do (behaviors). It's like a data type that you make yourself.
And an object is an instance of a class, that can store the data you specified and do the things you defined. Like how you can make variables of built-in types like int or char, objects are like variables of a class.
+ 3
class is a specification for how things should be. object is a thing that follows the specs laid out by it's class.
does it answer your question?
+ 3
If Human is a class, you are an object. Simple like that.
+ 3
I hope this helps
Class ~ a Human General
Obj ~ Githesh, Manual, Tamra. Identity
+ 3
One class ~ Anime
Many objects ~ Naruto Uzumaki, Son Goku, Monkey D. Luffy....
+ 1
class Super Hero
obj Super man, The flash