2 comments on “Java Long and Integer objects, Interning and comparison methods”

Java Long and Integer objects, Interning and comparison methods

This is someting that shocked me about Java, if you keep reading you'll be shocked too. The question is simple: how do you compare two Integers? And two Longs? If you are a decent java developer you'd never do it…