method Archive

Method Overriding in Java

A subclass inherits all public and protected methods from its super class. You can modify the superclass methods in subclass with the same method signature as defined in superclass. Some it is very important to modify superclass method in subclass to change or customize the implementation of superclass method. The following class Card Note :

Method Overloading in Java

When two or more then two methods sharing same name within the same class, having different type of parameters or different number of parameters. This is known as method overloading. public class MethodOverload { public static void main(String args) { System.out.println("The sum of 10 and 20 " + sum(10, 20)); System.out.println("The sum of 10.0 and