Accessing class properties and behaviour outside the class.
After creating an object, you can access the class properties and behavior by using object name followed by dot operator (.) followed by properties name/ instance variable/behavior/method name. Syntax: object_name.properties or object_name.behavior In the above example, we have created one object of class Car called car_object and for accessing properties we are using car_object.price (properties/ …
Accessing class properties and behaviour outside the class. Read More »