Here you can find the source of createFile(String path)
public static File createFile(String path)
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { /** Procedure for creating a File */ public static File createFile(String path) { File file = new File(path); if (!file.exists()) { try { file.createNewFile();/*from ww w. j a v a2 s . c om*/ } catch (IOException e) { e.printStackTrace(); } } return file; } }