- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay8_Overload.java
More file actions
Latest commit
39 lines (36 loc) · 687 Bytes
/
Copy pathDay8_Overload.java
File metadata and controls
39 lines (36 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
classTest
{
publicvoidm1()
{
System.out.println("m1.........");
}
publicvoidm1(intx)
{
System.out.println("int m1.....");
}
}
classTest1extendsTest
{
publicvoidm2()
{
System.out.println("m2.......");
}
publicvoidm2(intx)
{
System.out.println("int m2........");
}
}
publicclassDay8_Overload
{
publicstaticvoidmain(String[] str)
{
// Test t = new Test();
// Test1 t1 = new Test1();
Testt1= newTest1();
// Test1 t1 = new Test(); //not possible
// t1.m1();
// t1.m1(10);
// t1.m2();
// t1.m2(10);
}
}