Tutorial 10: Constructor Overloading
Code:
MainConstOverloading.java
package Package2;
/**
*
* @author Ankit
*/
public class MainConstOverloading {
public static void main(String[] args) {
MethodOverloading o1 = new MethodOverloading();
o1.printData(10);
o1.printData(20, 30);
o1.printData(40, 50, 60);
}
}
/**
*
* @author Ankit
*/
public class MainConstOverloading {
public static void main(String[] args) {
MethodOverloading o1 = new MethodOverloading();
o1.printData(10);
o1.printData(20, 30);
o1.printData(40, 50, 60);
}
}
No comments:
Post a Comment