What are File and RandomAccessFile classes?

Answer Posted / y s rajasekhara reddy

File
1. Java.io.file
2. Implements Comparable and Serializalble interfaces
3. The File class is used to perform the operations on files
and directories of the file system of an operating system.
4. The contents of the files cannot be read or write.

RandomAccessFile
1. Java.io.RandomAccessFile
2. Implements DataInputStream and DataOutputStream interfaces
3. The RandomAccessFile class has methods that perform the
direct access to data of any part of the file.
4. It provides the facilities to write primitive data to the
files.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you set the applet size?

697


Break statement can be used as labels in java?

656


Can we override the static methods?

677


what is the difference between preemptive scheduling and time slicing? : Java thread

630


Define how can we find the actual size of an object on the heap?

768






What is casting in java programming?

672


Why is java logo a cup of coffee?

705


What is the technique adopted to create an immutable class?

634


What is difference between fail-fast and fail-safe?

689


What do you mean by object?

640


What is the purpose of using break in each case of switch statement?

642


Can we use a switch statement with strings?

653


Is list thread safe in java?

588


Can I learn java in 3 months?

627


What technique can be employed to compare two strings?

688