Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Java program to check whether file hidden or not

In this Program, we are going to share Java Program to check whether a file is hidden or not. If you are a Java beginner and want to start learning the Java programming, then keep your close attention in this tutorial as I am going to share how to write a Java program to check whether file hidden or not.

Java program to check whether file hidden or not

Copy the below Java program and execute it with the help of Javac compiler. At the end of this program, We have shared the output of this program.

import java.io.*;

public class IsHidden 
{

  public static void main(String[] args) 
  {  
     File file = new File("C:/javaprograms/test.txt");
         
     boolean blnHidden = file.isHidden();
        
     System.out.println("Is this file " + file.getPath() + " hidden ?: " + blnHidden);
  }

}

Is this file C:\javaprograms\test.txt hidden ?: true

The post Java program to check whether file hidden or not appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

Java program to check whether file hidden or not

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×