Skip to content

Commit 84cd0bb

Browse files
rtomarrtomar
rtomar
authored and
rtomar
committed
Till covariance
1 parent 4dcf5b9 commit 84cd0bb

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Lecture Example BAO 2019/src/com/rt/covariant/A.java

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ public class A {
55

66
int a,b;
77

8+
9+
public int temp()
10+
{
11+
return 0;
12+
}
813
public A myfun(int a,int b){
914
System.out.println("Original method"+a+" "+b);
1015
return new A();

Lecture Example BAO 2019/src/com/rt/covariant/B.java

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
public class B extends A {
66

7+
public int temp()
8+
{
9+
return 10;
10+
}
11+
12+
713
@Override
814
public C myfun(int a, int b) {
915
// TODO Auto-generated method stub

0 commit comments

Comments
 (0)