+ 1

What makes object different if they access same class

16th Feb 2019, 3:58 PM
Dash
Dash - avatar
3 Antworten
+ 3
If I knew what language you'd prefer, I could give an example. Each object has the variables from the class they are created from, so you make the objects different by making those variables different for each object. For example, if a class had a string for each object's name, you can change the name for each object, if you wanted to.
16th Feb 2019, 4:11 PM
Zeke Williams
Zeke Williams - avatar
+ 1
It is the same for int. Each int are the same and have the same behaviour except for the value. When you modify an object you don't modify all the class'object.
18th Feb 2019, 10:02 PM
sic
0
The main difference is the memory value. And eventually you will change the properties of objects during runtime
16th Feb 2019, 4:08 PM
Seniru
Seniru - avatar