isdirectoryexception.java

来自「1.文件和目录管理」· Java 代码 · 共 19 行

JAVA
19
字号
/**
 * IsDirectoryException extends Exception throws when to copy file 
 * or to stastic file but the file is a directory
 * and show a message dialog
 */

package file;
import javax.swing.*;
import java.io.*;

public class IsDirectoryException extends Exception {
	
	public IsDirectoryException(String fileName) {
		
		super(fileName);
		JOptionPane.showMessageDialog(null,
					"File " + fileName + " is a foder not a file !");
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?