0
What is object & class?? Exmple plzz
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.
0
tnxx bro