Java ShortBuffer.hasArray()
Syntax
ShortBuffer.hasArray() has the following syntax.
public final boolean hasArray()
Example
In the following code shows how to use ShortBuffer.hasArray() method.
import java.nio.ShortBuffer;
//from ww w . j a va 2s . co m
public class Main {
public static void main(String[] args) {
ShortBuffer bb = ShortBuffer.allocate(10);
bb.put((short)100);
System.out.println(bb.hasArray());
}
}
The code above generates the following result.