Answers for "creating file in specific location in java application"

1

creating file in specific location in java application

String path = "C:" + File.separator + "hello" + File.separator + "hi.txt";
// Use relative path for Unix systems
File f = new File(path);

f.getParentFile().mkdirs(); 
f.createNewFile();
Posted by: Guest on June-23-2020

Code answers related to "creating file in specific location in java application"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language