Skip to content

Instantly share code, notes, and snippets.

@darrenbkl
Created January 16, 2020 15:01
Show Gist options
  • Save darrenbkl/435312a74e4deb0a59e712ea633023fe to your computer and use it in GitHub Desktop.
Save darrenbkl/435312a74e4deb0a59e712ea633023fe to your computer and use it in GitHub Desktop.
class ReifiedGenerics {
public void process(List<String> l) {
System.out.println("Processing list of string");
}
public void process(List<Integer> l) {
System.out.println("Processing list of integer");
}
}
```
But of course, you will get this error
```
process(java.util.List<java.lang.Integer>) and process(java.util.List<java.lang.String>) have the same erasure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment