Retrieving the base DS ... I read that a method hashCode()for a primitive type intis available, and if called in int, it will throw an error
error: int cannot be dereferenced
Does this mean that if int n = 10, then it HashCodewill also be 10 ??
If I still need to see the hascode for intin the program below, is there a way to see it, for exampleInteger Wrapper
public static void main(String []args){
String me = "hello";
int n = 10;
int h1 = me.hashCode();
int h2 = n.hashCode();
System.out.println(h1);
System.out.println(h2);
}
source
share