// method overloading0 DIS class Test0 { int k = 5; void test(int k) { System.out.println("A: " + k); } void test(int j, int k) { System.out.println("B: " + j + " " + k); } void test(double x) { System.out.println("C: " + x); } int test() { return this.k; } } public class mo0 { public static void main(String[] args) { Test0 t = new Test0(); // call construc (1) t.test(1); t.test(2,3); t.test(4.0); System.out.println("D: " + t.test()); } } /* Output: A: 1 B: 2 3 C: 4.0 D: 5 */