Given the following code:
class A{
int i;
int hashcode(){
. . .
}
}
Precisely, given an object a
of A
how can one say that hashcode()
which inherited from Object
class is overridden in the class A
.
a.getClass().getDeclaringClass()
is returning Object
class. I want it to output A
.