Here you can find the source of delete(String fileNameWithFullPath)
public static boolean delete(String fileNameWithFullPath)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**// www . java 2 s . co m * Deletes a File Object. */ public static File delete(File file) { file.delete(); return file; } /** * Deletes a File from an url. */ public static boolean delete(String fileNameWithFullPath) { File file = new File(fileNameWithFullPath); return file.delete(); } }