This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is an OS-dependent thing; there's no Java API for it. On UNIX, by convention, hidden files are those whose names start with a dot (.). Does Windows have hidden files? If so, if it's name-based, then just use the appropriate names; otherwise, perhaps you can run some Windows command using Runtime.exec() to make files into hidden files.