I found the following code snippet from The Java™ Tutorials Type Inference
static <T> T pick(T a1, T a2) { return a2; }
Serializable s = pick("d", new ArrayList<String>());
So a1 and a2 can be different type here, how can I force them to be the same type? say only pick("d", "e"); can be called.