Wednesday, May 8, 2013

Tutorial 11: Method Overloading


Tutorial 11: Method Overloading

Code: 

MethodOverloading.java

package Package2;


public class MethodOverloading {
    void printData(int a){
        System.out.println("value of a is:"+a);
    }
    void printData(int a, int b){
        System.out.println("value of a is:"+a);
        System.out.println("value of b is:"+b);
       
    }
    void printData(int a, int b, int c){
        System.out.println("value of a is:"+a);
        System.out.println("value of b is:"+b);
        System.out.println("value of c is:"+c);
    }
}

1 comment:

  1. Sorry guys sorry for background noise...

    from the next tutorial you won't face this problem of background noise...

    ReplyDelete