We are having 2 variants:
1 – when we want to create single folder (C:\first)
2 – when we want to create all tree for folders (C:\1\2\3)

Let’s try to create it:

1
2
3
4
5
6
7
//First variant
File folder= new File("C:\\first");
file.mkdir();

//Second variant
File folders= new File("C:\\1\\2\\3");
files.mkdirs();

After that we will see all folder which we want.