Hello! I have a question, this equality thing is driving me nuts....
Correct me If I'm wrong but in the following code I thought
only one String Object(at the lined marked //3) would be created on the heap, Given that the Literal is the same, right?
Assuming that I further supposed that Both references, i and j referred the same String Object on the Heap....
So, my conclusion was that This little piece of code here Would Print
true. But to my surprise... it outputs
false Could someone please give me all details of why This code outputs false?
My confusion is even greater than you imagine...because as you can see there's only one Integer Object instantiated. I thought that would play a role in this code's behavior, but it doesn't.
Best Regards,
Jose
[ April 09, 2008: Message edited by: Jose Campana ]