fork download
  1. import java.util.*;
  2.  
  3. public final class Main<T> {
  4. private void overloadedMethod(Collection<?> o) {
  5. System.out.println("Collection<?>");
  6. }
  7.  
  8. private void overloadedMethod(ArrayList<Integer> o) {
  9. System.out.println("ArrayList<Integer>");
  10. }
  11.  
  12. public void method(ArrayList<T> l) {
  13. overloadedMethod(l);
  14. }
  15.  
  16. public static void main(String[] args) {
  17. Main<Integer> test = new Main<Integer>();
  18. ArrayList<Integer> l = new ArrayList<Integer>();
  19. test.method(l);
  20. }
  21. }
Success #stdin #stdout 0.08s 212416KB
stdin
Standard input is empty
stdout
Collection<?>