Java Arrays hashCode Double


Java Arrays hashCode Double

package com.codingdict;

import java.util.Arrays;

public class ArrayDemo {
   public static void main(String[] args) {

      // initializing double array
      double[] dval = new double[] { 2.9, 1.7 };

      // hashcode for value1
      int retval = dval.hashCode();

      // printing hash code value
      System.out.println("The hash code of value1 is: " + retval);

      // value2 for double array
      dval = new double[] { 1.2, 3.4 };

      // hashcode for value2
      retval = dval.hashCode();

      // printing hash code value
      System.out.println("The hash code of value2 is: " + retval);
   }
}