-
-
Save darrenbkl/435312a74e4deb0a59e712ea633023fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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