Using Static and Instance constructor methods
The constructor method is a instance method that is automatically called when the class object is created.class_constructor is a static method which is automatically called exactly once before the class is first accessed.
class_constructor is defined with CLASS-METHODS and constructor is defined with METHODS.
If class is inherited from another class,only superclass can have constructor method.Sub class can not have constructor method.
If class is inherited from another class,superclass as well as subclass can have class_constructor method defined.
Implementation of main class methods.
Implementation of sub class methods:
Create objects and call methods.
Be the first to leave a comment
You must be Logged on to comment or reply to a post.