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);
}
}
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);
}
}
Sorry guys sorry for background noise...
ReplyDeletefrom the next tutorial you won't face this problem of background noise...