Re:On Android, Garbage Collection Can Kill You
by swah on Monday June 25, 2012 @05:01PM
(#4158724)
Can you explain what is obviously wrong in this code?
[ Parent
| on HN ]
Re:On Android, Garbage Collection Can Kill You
by jemfinch on Monday June 25, 2012 @05:57PM
(#4158947)
You don't need to allocate a new double to call hashCode on it. You can just call hashCode on the double you already have.
Out of curiosity, what language background are you coming from that this isn't obvious?
Python mostly.
The constructor for Double is:
Double(double value)
I thought only 'Double' had the class methods, not 'double'.