Java tutorial
//package com.java2s; import java.io.File; public class Main { public static File createFile(String folderPath, String fileName) { File destDir = new File(folderPath); if (!destDir.exists()) { destDir.mkdirs(); } return new File(folderPath, fileName + fileName); } }