0

What is object & class?? Exmple plzz

1st Nov 2016, 3:14 PM
Debojyoti Dey
Debojyoti Dey - avatar
2 Antworten
+ 1
Definition is - object is a class instance. For example - you are an object of a class human. You are existing, but "human" isn't. Similar, perhaps better example - class "vehicle" and object "car". If you have a car, you know it is a vehicle, but can you imagine vehicle (without imagining one of its instances e.g. car, boat, plane)? Class vehicle can have a method turn_on(), but it means just that all vehicles can be turned on, nothing more. When you have an instance of the vehicle - car or boat, you can call this method on existing object.
1st Nov 2016, 3:39 PM
Wojciech Skibiński
Wojciech Skibiński - avatar
0
tnxx bro
1st Nov 2016, 3:59 PM
Debojyoti Dey
Debojyoti Dey - avatar