SyntaxFix
Write A Post
Hire A Developer
Questions
Use File.mkdirs():
File.mkdirs()
File dir = new File("C:\\user\\Desktop\\dir1\\dir2"); dir.mkdirs(); File file = new File(dir, "filename.txt"); FileWriter newJsp = new FileWriter(file);