Generic
Source code
1
import
java.util.Collections;
2
import
java.util.List;
3
4
class
Generic<GEN
extends
Number> {
5
6
byte
m1(GEN t) {
7
return
t.byteValue();
8
}
9
10
List<GEN> m2(GEN t) {
11
return
Collections.singletonList(t);
12
}
13
14
}
Bytecode
Java compiler version:
21
Other examples
Main page