0

What's the difference between object and instance? Can anyone explain? Pls

16th Aug 2022, 11:13 AM
Ankit Sahu
Ankit Sahu - avatar
3 Answers
+ 4
An object is a structure in coding that holds methods and attributes. An instance is an object that has been created and stored in memory.
16th Aug 2022, 11:18 AM
Slick
Slick - avatar
+ 4
An object is the type of car selling in the showroom, which you can choose it's color, engine type, tyre, leather seat
 An instance is the car you have bought and placed in your garage, you can crash it too

16th Aug 2022, 11:25 AM
abpatrick catkilltsoi
abpatrick catkilltsoi - avatar
0
I thought object and instance are the same thing, and the question usually is the difference between class and object. class is a description of an object, and the object is, well, an object, an instance of that class.
17th Aug 2022, 7:08 AM
lion
lion - avatar