What is the purpose of the File class?

Answer Posted / ranganathkini

The java.io.File class abstracts a filename and directory
pathnames. It provides useful methods to perform some basic
filesystem operations such as, verifying the existance of a
file, getting the absolute or relative path of a file,
verifying if a path refers to a directory or file, verifying
the permissions on a File, checking the file length,
create/remove folders, etc.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest java version?

805


What are the three parts of a lambda expression?

748


what is session in java?

983


What are the differences between graph and tree?

870


What do u mean by variable?

795


What is the difference between a synchronized method and a synchronized block?

850


how to one war file class to another war file class?

1773


Explain purpose of sleep() method in java?

837


What is a short in java?

700


What is a ?

962


What is the synonym of string?

774


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

731


What is numeric function?

726


What is the use of keywords in java?

765


Can we access the non-final local variable, inside the local inner class?

770