What are File and RandomAccessFile classes?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain thread life cycle in java?

587


What is the generic function?

526


What is null in java?

519


How can you generate random numbers in java?

578


What is an example of procedure?

510






What is local variable and instance variable?

604


What is the different types of functions?

551


What is a java lambda expression?

551


How will you compute size of a structure?

580


Is java 11 paid version?

506


What methodology can be employed to locate substrings inside a string?

524


Why do I need to declare the type of a variable in java?

562


Difference between arraylist and hashset in java?

537


What are the different access modifiers available in java?

557


Does unicode support all languages?

516