Java ShortBuffer.hashCode()
Syntax
ShortBuffer.hashCode() has the following syntax.
public int hashCode()
Example
In the following code shows how to use ShortBuffer.hashCode() method.
import java.nio.ShortBuffer;
/*from w w w .ja v a 2 s .com*/
public class Main {
public static void main(String[] args) {
ShortBuffer bb = ShortBuffer.allocate(10);
bb.put((short)100);
System.out.println(bb.hashCode());
}
}
The code above generates the following result.