Abhi vijay wrote:No, its Overloaded.
this is the signature for overriding equals().
Abhi vijay wrote:No, its Overloaded.
this is the signature for overriding equals().
All code in my posts, unless a source is explicitly mentioned, is my own.
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
All code in my posts, unless a source is explicitly mentioned, is my own.
All code in my posts, unless a source is explicitly mentioned, is my own.
Ruben Soto wrote:No problem. Also, I pretty much repeated what James said. He must have submitted his answer while I was writing mine. Sorry there buddy!
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Abhi wrote: Here size :2 that means when adding to the HASHSET the overloaded method is not considered.? Why so?
SCJP 6
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
James Tharakan wrote: So is there any way to call the overloaded equals method after the hashCode is executed.
(I guess Explicitily call the overloaded method from the hashCode does not make sense )
SCJP 6
Punit Singh wrote:
No, for that you have to write a new JDK 10. You have to redesign HashMap.java code.
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|