Checking whether a file or directory in Java
Checking whether the File object exists if exists then check whether it is file of directory to check file existance exists() method of File class is used if it returns true means file or directory exists, at this point we are not confirm existing File object is file or directory. To check file object isDirectory() … Read more