[java] 1000 monkeys could've implemented better Generics than Sun did
import java.util.*; public class Test { public static void main(String args[]) { Map map = new HashMap(); map.put(45L,"die now"); System.err.println(map.get(45)); } }
Not only does this motherfucker compile with no warnings or other problems, but at runtime, it prints FUCKING NULL.
So, my question to the braintrust that designed an implemented the pile-of-shit-Generics is:
- If the literal “45” isn’t a long (and therefore is not a key in my map), WHY THE FUCK DOES IT COMPILE?