Java Arrays.hashCode(double[] a)

Syntax

Arrays.hashCode(double[] a) has the following syntax.

public static int hashCode(double[] a)

Example

In the following code shows how to use Arrays.hashCode(double[] a) method.


//from  w w w  .j ava  2  s . com


import java.util.Arrays;

public class Main {

  public static void main(String[] args) {

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


    System.out.println(Arrays.hashCode(dval));
    System.out.println(dval.hashCode());
  }
}

The code above generates the following result.