+ 2

What different between class and object?

5th Mar 2018, 10:22 PM
Laique Khan
Laique Khan - avatar
2 Answers
+ 5
Class is model or blueprint of object which has attributes and methods. Object is (one) instance of his class. Before you do not instance object you can't use and call his: methods, change value of attributes etc. when you create object then it takes part of memory (ram) where will it be that object and you can use it.
6th Mar 2018, 3:03 AM
Dejan Perovic
Dejan Perovic - avatar
+ 3
A class is a skeleton or a format which is evident in its objects while an object is an instance of the class, treated as a variable.
6th Mar 2018, 6:56 AM
Naveen Maurya
Naveen Maurya - avatar