We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 80a8d95 + 887eeaf commit 487a049Copy full SHA for 487a049
core-java-modules/core-java-lang-syntax/src/main/java/com/baeldung/generics/Generics.java
@@ -35,4 +35,11 @@ public static List<Integer> createList(int a) {
35
return list;
36
}
37
38
+ public <T> List<T> genericMethod(List<T> list) {
39
+ return list.stream().collect(Collectors.toList());
40
+ }
41
+
42
+ public List<Object> withErasure(List<Object> list) {
43
44
45
0 commit comments