Java LongBuffer.get(int index)
Syntax
LongBuffer.get(int index) has the following syntax.
public abstract long get(int index)
Example
In the following code shows how to use LongBuffer.get(int index) method.
import java.nio.LongBuffer;
//from w ww. j av a 2s.com
public class Main {
public static void main(String[] args) {
LongBuffer bb = LongBuffer.allocate(10);
bb.put(100);
bb.rewind();
System.out.println(bb.get(0));
}
}
The code above generates the following result.