How to create File and directory in Java is probably the first things come in mind when we exposed to file system from Java. Java provides rich IO API to access contents of File and Directory in Java and also provides lots of utility method to create file, delete file, read from file, and write to file or directory. Anybody who wants to develop application in Java should have a solid understanding of IO and Networking package. In this Java File Tutorial we will basics of File and Directory in Java, How to Create File and Directory in Java, Utility methods provided by File API and Common Exception or Error you will face during File and Directory Creation or access time. Creating File is different than creating Thread in java as you don’t have to implement any interface for making a Class as File in Java.
File in Java is also getting its place on various core java interviews questions specially after introduction of java.nio package and concepts like In Memory Files, we will discuss about those in probably another blog post but what it confirms is importance of knowledge of File IO for java programmer.