java hashCode() function on reference variable and objects -


for example, if create type object,

a = new a(); 

then reference on stack points a type object on heap. question is, if call a.hashcode(), one's hash code returned, hashcode of reference or hashcode of object? if hashcode of object, how can hashcode of reference? kindly give me tips plz?

hashcode() non-static method, other non-static method. it's either defined a, or base class of a (object, in worst case). happens method gets called on instance in question.

how can hashcode of reference?

you can't, because doesn't make sense.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -