Java tutorial
/* * Output: test.txt is not hidden */ import java.io.File; public class MainClass { public static void main(String[] args) { // Create an object that is a directory File myFile = new File("test.txt"); System.out.println(myFile + (myFile.isHidden() ? " is" : " is not") + " hidden"); } }