What is the purpose of the File class?

Answers were Sorted based on User's Feedback



What is the purpose of the File class?..

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

What is the purpose of the File class?..

Answer / ravikiran

fileclass is used to read or write data from and to the file

Is This Answer Correct ?    5 Yes 2 No

What is the purpose of the File class?..

Answer / letsapa

can be used to find information about a file, such as
whether it exist or is open, its size, and its, last
modification

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is not thread safe?

0 Answers  


Can a class have more than one object?

0 Answers  


How many static init can you have?

0 Answers  


What is the maximum size of arraylist in java?

0 Answers  


Which is the best approach for creating thread ?

0 Answers  


What is a methodologist?

0 Answers  


What is update method and when it is called?

2 Answers   TCS,


How does java enable high performance?

0 Answers  


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

0 Answers  


In the below example, how many string objects are created?

0 Answers  


What is the difference between Stream Reader and Stream Writer?

4 Answers  


What is difference between jdk,jre and jvm?

0 Answers  


Categories