Even if you have two different strings with the same value, they will have the same hashcode. In the below example HashCode is the same? But the memory address is the same? How I can get it in java.
jshell> var a = new String("Ranga")
a ==> "Ranga"
jshell> var b = new String("Ranga")
b ==> "Ranga"
jshell> a.hashCode()
$31 ==> 78727449
jshell> b.hashCode()
$32 ==> 78727449
jshell> a == b
$33 ==> false