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

Which is faster set or list in java?

815


What does method mean?

763


Can variables be used in java without initialization?

832


Is minecraft java edition free?

878


Can we write method inside a method in java?

770


Can static methods be inherited?

800


Write a function to print Fibonacci series and Tribonacci series?

981


What is finalize()?

893


Who found java?

794


Explain what access modifiers can be used for methods?

822


What is abstract class constructor called?

803


What is the point of java?

807


What is a vararg?

765


What is the default access specifier for variables and methods of a class?

883


Explain the difference between runnable and callable interface in java?

836