Description Of BigInteger: hashCode()
The
java.math.BigInteger.hashCode() returns the hash code for this BigInteger.
Code Example Java BigInteger
import java.math.BigInteger;
public class BigIntegerExam {
public static void main(String[] args) {
BigInteger bi1 = new BigInteger("8");
BigInteger bi2 = new BigInteger("7");
BigInteger bi3 = new BigInteger("6");
int h1 = bi1.hashCode();
int h2 = bi2.hashCode();
int h3 = bi3.hashCode();
// show HashCode
System.out.println("HashCode of " + bi1 + " is " + h1);
System.out.println("HashCode of " + bi2 + " is " + h2);
System.out.println("HashCode of " + bi3 + " is " + h3);
}
}
ไม่มีความคิดเห็น :
แสดงความคิดเห็น