Deleting a txt File | بلاگ

Deleting a txt File

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I have a file in java that I want to delete but I can't. Here is my code.

public static File fileSave1 = new File("saves/save1.txt");

System.out.println("File Deleted.");

As you can see I have tried to use .delete but it doesn't work. I have done research and this is the only way I have seen to delete a file. I believe if I change the file type by removing static it may work but then it would break all of my methods. Any help is appreciated, thanks!

asked 53 secs ago

نویسنده : استخدام کار بازدید : 17 تاريخ : سه شنبه 2 مرداد 1397 ساعت: 22:20