Could someone kindly tell me why the following piece of code behaves the way it does? Basically I've defined a hashmap where the key is a Long object. I populate the map with an entry and then try and retrieve that entry with an int primitive. I understand the int I pass into get() is autoboxed into an Integer. The compile-time check asserts that myint can be promoted from int to long, but what is happening at run-time that causes a value of 'null' to be returned? I prostrate before the Ranch and beseech its apt members for guidance!!
my value for int key is: null
my value for long key is: hello
"Wait till you look within yourself and see what is there.... Oh Seeker, one leaf in that garden is worth more than all of Paradise!"