- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check if a file is hidden in Javan
The java.io.File class provides useful methods on file. This example shows how to check a file hidden or not by using the file.isHidden() method of File class.
Example
import java.io.File; public class Main { public static void main(String[] args) { File file = new File("C:/java.txt"); System.out.println(file.isHidden()); } }
Result
The above code sample will produce the following result (if the file "java.txt" exists and is hidden in 'C' drive).
true
- Related Articles
- Check if a File is hidden in C#
- Check whether the file is hidden or not in Java
- Determine if File or Directory is hidden in Java
- How To Check If A Row Is Hidden In Excel?
- Check if a file exists in Java\n
- Java Program to check if a file or directory is readable
- Check if hidden files are displayed in the FileChooser or not in Java
- How to check if a file is readable, writable, or, executable in Java?
- How do I check if an element is hidden in jQuery?
- Check whether a file is a directory in Java
- How to check if a file exists or not in Java?
- Golang Program to check if a file is directory or a file
- How to check if a file is a directory or a regular file in Python?
- Check if a File exists in C#
- Check whether the given file is an existing file in Java

Advertisements