Given a file, and we have to check whether it is hidden or not using Java program?
File.isHidden()
This is a method of "File" class, which returns true if a file has hidden property and return false if it is not.
In this program, we are using a file named "includehelp.txt" which is stored in "E:\" in my system, program will check its hidden property and returns the result.
Program to check file is hidden or not in java
Output
Here, we are using an another method file.getPath() which returns the file name with path of that file, which is used while creating an object of “File” class.
need an explanation for this answer? contact us directly to get an explanation for this answer