can i know how to fix this error? is delete method

Posted by user334101 on Stack Overflow See other posts from Stack Overflow or by user334101
Published on 2010-05-06T09:30:09Z Indexed on 2010/05/06 9:38 UTC
Read the original article Hit count: 186

Filed under:
|
import javax.swing.*;
import java.io.File;

public class Third {

    public static void main(String[] args)  throws Exception {
        String humanName; 

        humanName = JOptionPane.showInputDialog(null, "Enter the file name");
        File file = new File(+ humanName".txt");
        System.out.println(file.delete());
        JOptionPane.showMessageDialog(null, "File deleted" + humanName);
    }

}

© Stack Overflow or respective owner

Related posts about java

Related posts about delete