Skip to content

Instantly share code, notes, and snippets.

@pyricau
Created December 10, 2013 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyricau/7901730 to your computer and use it in GitHub Desktop.
Save pyricau/7901730 to your computer and use it in GitHub Desktop.
Does this compile? Why?
import java.util.List;
public class Test<T> {
public static String getFirst(Test test) {
return test.strings.get(0);
}
List<String> strings;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment