Monday, February 1, 2016

MethodOverRiddingExample4

package methodOverridding;

public class MethodOverRiddingExample4 {

public void sum(int a, int b){
int c = a+b;
System.out.println("sum is from parent with two argument:-"+c);
}

public void sum(int a, int b, int c){
int d = a+b+c;
System.out.println("sum is from parent with three argument:-"+d);
}

public void mutiply(int a, int b){
int d = a*b;
System.out.println("multiply is from parent:-"+d);
}

}

1 comment:

  1. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    Core Java Training in Electronic city

    ReplyDelete