public static void main(String[] args) { //删除指定位置的本地图片(删除成功返回true,失败返回false) System.out.println(new File("C:\\img\\123.png").delete()); }