Sunday, 4 December 2016

Java-Polymorphism

Polymorphism (Many forms)
        It means that one interface, Multiple actions.
        It is used for common class of actions.
        Common methods are used.
Types:-
i) Static polymorphism (or)compile (or)early binding.
ii) Dynamic polymorphism (or) runtime (or)late binding.
i) Static polymorphism:-(Compile time polymorphism)
        Methods are binding to an object during compilation time.
        Constructor overloading and method overloading are examples of static polymorphism.
Method overloading:-

        A class or its derived class can have more than one methods with same name but they differ with no.of args or data type of the args and order of the args.

No comments:

Post a Comment

Featured post

Development Of JAVA Program