Java Arrays.hashCode(byte[] a)
Syntax
Arrays.hashCode(byte[] a) has the following syntax.
public static int hashCode(byte[] a)
Example
In the following code shows how to use Arrays.hashCode(byte[] a) method.
/*from ww w . j a v a2s . c o m*/
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
byte[] bval = new byte[] { 10, 45 };
System.out.println(Arrays.hashCode(bval));
System.out.println(bval.hashCode());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »