Difference between the File and RandomAccessFile classes in Java?

What is the difference between the File and RandomAccessFile classes?

The OS based file system services such as creating folders, files, verifying the permissions, changing file names etc., are provided by the java.io.File class.

The java.io.RandomAccessFile class provides random access to the records that are stored in a data file. Using this class, reading and writing , manipulations to the data can be done. One more flexibility is that it can read and write primitive data types, which helps in structured approach in handling data files.
What are synchronized methods and synchronized statements in Java?
Synchronized methods are utilized to control the access to an object especially in multi threaded programming....
Explain Java class loaders? Explain dynamic class loading?
The classes are available to the JVM and are referenced by the name. After JVM starts, it introduces the classes into it.....
Difference between an abstract class and an interface in Java.
An abstract has one or more abstract methods apart from concrete methods. All the abstract methods must be overridden by its subclasses....
Post your comment