CAN I MAKE A FOLDER WITH MY JAVA CODE ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

CAN I MAKE A FOLDER WITH MY JAVA CODE ?

12th Feb 2017, 4:10 AM
RAJESH SINGLA
RAJESH SINGLA - avatar
1 Answer
+ 3
Yes you can, there are several different ways to do it depending on if you want to make 1 directory or up to all in the path if they don't exist and which version of Java you are using. You should be sure to do some checking in the process to see if the folders/directories already exist, so as not to overwrite them, and catch your errors. Here is some more info to get you going: http://stackoverflow.com/questions/3634853/how-to-create-a-directory-in-java
12th Feb 2017, 7:10 AM
ChaoticDawg
ChaoticDawg - avatar