Skip to content

Commit d304440

Browse files
Update README.md
1 parent e4390bd commit d304440

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5619,6 +5619,36 @@ class Example3{
56195619
56205620
System.out.println(a.m(al));
56215621
5622+
A2<ArrayList<Object>> a1 = new A2< ArrayList<Object>>() {
5623+
@Override
5624+
public ArrayList<Object> m(ArrayList<Object> a) {
5625+
return a;
5626+
}
5627+
};
5628+
5629+
ArrayList<Object> al1 = new ArrayList<>();
5630+
al1.add(1);
5631+
al1.add(2.0f);
5632+
al1.add(3.33D);
5633+
5634+
System.out.println(a1.m(al1));
5635+
5636+
A2<ArrayList<Serializable>> a2 = new A2< ArrayList<Serializable>>() {
5637+
@Override
5638+
public ArrayList<Serializable> m(ArrayList<Serializable> a) {
5639+
return a;
5640+
}
5641+
};
5642+
5643+
ArrayList<Serializable> al2 = new ArrayList<>();
5644+
al2.add(1);
5645+
al2.add(2.0f);
5646+
al2.add(3.33D);
5647+
5648+
System.out.println(a2.m(al2));
5649+
5650+
//Object and Serializable are super types of Number class
5651+
56225652
56235653
}
56245654
}

0 commit comments

Comments
 (0)