Trick the eye

I admit I was tricked:

 

import java.util.ArrayList;
public class ListProvider {
  public static <ArrayList> ArrayList getList(ArrayList ar) {
    return ar;
  }
  public static void main(String[] args) {
      getList("I am a list");
  }
}

This code compiles and runs of course.

Comments

IMO, rule no.1 in generics : "Don't redefine a class using a Type unless you deliberately want to confuse people."

BTW - The compiler will give you a warning about it : "The type parameter ArrayList is hiding the type ArrayList". so rule no.2 - don't ignore compiler warnings...