How to create sub-folder in SD Card, using Java code
If you want to create sub-folder in SD Card using Java code, you can use the mkdir() method of java.io.File class.

ex.
And also, AndroidManifest.xml have to be modify to add permission of "android.permission.WRITE_EXTERNAL_STORAGE"
Related Article:
- Save file to SD Card
- How to create sub-folder in SD Card of Android Emulator, using adb
If you want to create sub-folder in SD Card using Java code, you can use the mkdir() method of java.io.File class.

ex.
String newFolder = "/myFolder2";
String extStorageDirectory = Environment.getExternalStorageDirectory().toString();
File myNewFolder = new File(extStorageDirectory + newFolder);
myNewFolder.mkdir();
And also, AndroidManifest.xml have to be modify to add permission of "android.permission.WRITE_EXTERNAL_STORAGE"
package="com.exercise.AndroidNewFolder"
android:versionCode="1"
android:versionName="1.0">
android:label="@string/app_name">
Related Article:
- Save file to SD Card
- How to create sub-folder in SD Card of Android Emulator, using adb