position(): This method is available in java.nio.Buffer class of Java.
Syntax:
int java.nio.Buffer.position()
This method returns this buffer's position.
Parameters: NA
Returns: The position of this buffer.
Exceptions: NA
Approach
Java
import java.nio.LongBuffer;public class LongBufferposition {public static void main(String[] args) {long array[] = { 1, 2, 3, 4 };LongBuffer lb = LongBuffer.wrap(array);System.out.println(lb.position());}}
Output:
0
No comments:
Post a Comment