Java Arrays.hashCode(float[] a)

Syntax

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

public static int hashCode(float[] a)

Example

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


//from   www . j  a  v  a2s .  c o  m
import java.util.Arrays;

public class Main {

  public static void main(String[] args) {
   
    // initializing float array
    float[] fval = new float[] { 32.1f, 55.4f };


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

The code above generates the following result.