Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Background: how we got the generics we have (2020).
There’s a bunch of ways to do this, but I’ll just leave this one trick here.
Instead of:
List<Integer> x = new ArrayList<Integer>();
List<Integer> x = new ArrayList<Integer>(){};
There are no comments on this comment yet.
There’s a bunch of ways to do this, but I’ll just leave this one trick here.
Instead of:
write this: Now you’ll be able to ask at runtime and determine it is a subclass of List<Integer>.