File handling delete operation

Program for delete operation in file handling:

package com.journaldev.files;
public class FileHandling {
      public static void main(String[] args) {
               File file = new File("profjayesh.txt");
               boolean delete = file.delete();
               System.out.println("File deleted = " + delete);

File deleted = true

Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.