Java IntBuffer.toString()

Syntax

IntBuffer.toString() has the following syntax.

public String toString()

Example

In the following code shows how to use IntBuffer.toString() method.


import java.nio.IntBuffer;
//from   w w  w  . ja  va  2  s .  com
public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(100);
    System.out.println(bb.toString());

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.nio »




Buffer
ByteBuffer
ByteOrder
CharBuffer
DoubleBuffer
FloatBuffer
IntBuffer
LongBuffer
MappedByteBuffer
ShortBuffer