Skip to content

Commit bf93c7c

Browse files
overriding_short
1 parent b4aa03f commit bf93c7c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

overloading_short

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
//if return type same and signature is different means that overloading method
3+
class b
4+
{
5+
void k(int j)
6+
{
7+
8+
}
9+
}
10+
class a extends b{
11+
void k(double i)
12+
{
13+
System.out.println(i);
14+
}
15+
}
16+
public class ridlod {
17+
18+
public static void main(String[] args)
19+
{
20+
a obj1=new a();
21+
obj1.k(12.2);
22+
}
23+
}

0 commit comments

Comments
 (0)