sakthi FrontTech

Greenhorn
+ Follow
since May 18, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sakthi FrontTech

We generally Override the hashCode() inorder to optimize the searching.


If you see the HashMap implementation, hashCode of the object(say Dog Object in this case) will be manipulated again to avoid the weak hashCode implementation, so hashCode alone need not be the reason for optimize the searching, of Course its one of the reason. Refer below code




In the example above you created only one Object of Dog "aiko" that was stored in bucket labelled '4'.


In Java's HashMap implementation hashCode of the object doesn't specify the location or bucket the hash method pasted above will specify the location or bucket. The location or bucket will be changed when the threshHold percentage is reached.
If you want to know more about the HashMap please refer source of the HashMap.
Hi,

I am wondering, Which will be the Better Approach to avoid the Tight Coupling
1) Spring AOP
or
2) Dynamic Reflection.
13 years ago