The method ________ of the RandomAccessFile class sets the file-pointer offset.
- moveFilePointer()
- seek()
- setFilePointer()
- setPointerOffset()
The method seek() of the RandomAccessFile class in Java is used to set the file-pointer offset to a specified location within the file. It allows you to navigate within the file and start reading or writing data from that position.
Loading...
Related Quiz
- Can an interface contain static methods in Java?
- Which of the following methods can be used to create a stream from a collection?
- Which class allows you to read lines of text from a file?
- What will be the output of the following code: int x = 10; x *= 3;?
- What will happen if an exception is not caught by any catch block?