What are File and RandomAccessFile classes?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
The java.io.File is represents a filepath and provides
methods to access filesystem services in the Java
application. Services such as creating folders, verifying
the existance or permissions of a file, etc.
The java.io.RandomAccessFile is a class that allows random
record based access to data stored in a file. This class
helps in creating and manipulating files in a record based
way unlike a sequential access provided by streams.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
What is the use of math abs in java?
What is the final variable?
Tell me are there implementations for sorting and searching in the java libarary?
Java support call by reference (pass by reference) ?
What is the synonym of string?
What is the driver class?
How concurrent hashmap works?
What is the arguement of main method?
Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?
What is meant by polymorphism?
How do you differentiate abstract class from interface?
Hey buddy.. can you please tell me about the use of marker interface? And is there any link between marker interface and factory methods? Thanks in advance.