Deleting a txt File

ساخت وبلاگ
چکیده : Vote count: 0 I have a file in java th... با عنوان : 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

back soft...
ما را در سایت back soft دنبال می کنید

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