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