How to Create Multiple Folders in Java

Create Multiple Folders in Java

This example program about, How to create multiple folders in java. The example program were tested with environment and output has been shared in the same post.

Example Program

The following program using the mkdir() method, Which is belongs to java.io.File class.

Output

Folder D is created
Folder I is created
Folder N is created
Folder E is created
Folder S is created
Folder H is created
Folder K is created
Folder R is created
Folder I is already exist
Folder S is already exist
Folder H is already exist
Folder N is already exist
Folder A is created
Folder N is already exist

References

1. Java File Class