Can't delete files in java?

后端 未结 5 690
广开言路
广开言路 2021-01-24 11:07

I am trying to delete all files in a folder:-

    import java.io.*;
public class AddService {   
    public static void main(String args[]){
        File folder=         


        
5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-24 11:52

    1. Try giving the full path in this statement: "File folder=new File("inputs");"
    2. Use try-catch block and print the exception, if any

提交回复
热议问题