Super keyword



The super class uses the super keyword to call the constructor from the sub class. Then the super class will run inside the constructor. "The super class can be accessed/called even from methods and variables with the super keyword".

                                       SUPER - SUPER CLASS...

Ex ; Class Monkey { 

        Monkey () {

        }

        }

        Class Man Extends Monkey { 

        Man () {

        Super () ;

        }

        }


                                                                                                                                                   D.M.T. Dasanayaka

                                                                                                                                                   Software Engineer

                                                                                                                                                   Java Development.

Comments