In this tutorial, we will see the use of hashCode() method of FloatBuffer class in java.
FloatBuffer API:
The java.nio.FloatBuffer class extends java.nio.Buffer class. It provides the following methods:
| Return type | Method | Description |
| static FloatBuffer | allocate( int capacity) | The allocate(..) method allocate a float buffer of given capacity. |
| int | hashCode() | The hashCode() method returns current has code of float buffer. It depends upon remaining elements. |
import java.nio.*;
|
|
C:\>java BufferHasCode hashCode of empty buffer: -394403839 hashCode of buffer : 2059922497 |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.