Here you can find the source of deleteFile(String fileName)
public static boolean deleteFile(String fileName)
//package com.java2s; import java.io.File; public class Main { public static boolean deleteFile(String fileName) { if (null == fileName || "".equals(fileName)) { return true; }/*w w w .j a va2s.c om*/ File f = new File(fileName); return f.delete(); } }