Java Arrays.hashCode(long[] a)

Syntax

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

public static int hashCode(long[] a)

Example

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


/* w  w w  . j  a  va  2 s.  c o  m*/

import java.util.Arrays;

public class Main {

  public static void main(String[] args) {
    
    // initializing long array
    long[] lval = new long[] { 87, 77 };


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

The code above generates the following result.