In this tutorial, we will check short buffer is equal to another buffer or not.
ShortBuffer API:
The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides the following methods:
| Return type | Method | Description |
| static ShortBuffer | allocate( int capacity) | The allocate(..) method allocate a short buffer of given capacity. |
| boolean | equals(object obj) | The equals(...) method tells this buffer is equals or not to another object. If another buffer is not short buffer method returns false. |
| abstract ShortBuffer | put(short i) | The put(..)method write a given short value at current position. |
import java.nio.*;
|
| C:\>java EqualsShortBuffer Not equal Equal Equal |
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.