fork download
  1. import java.util.*;
  2. public class Main {
  3. public static void main(String[] args) {
  4.  
  5. }
  6.  
  7. public String foo(List<String> object) {
  8. System.out.println(object.get(0));
  9. return null;
  10. }
  11.  
  12. public List<String> foo(List<List<String>> object) {
  13. System.out.println(object.get(0).get(0));
  14. return null;
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: error: name clash: foo(List<List<String>>) and foo(List<String>) have the same erasure
    public List<String> foo(List<List<String>> object) {
                        ^
1 error
stdout
Standard output is empty