📄 illegalrectangleexception.java
字号:
public class IllegalRectangleException extends Exception {
/**
* A class extends Exception.
* @author Ruixiao Wu.
* @version 1.0 26/06/2006.
*/
private static final long serialVersionUID = 1L;
/**
* A method to check whether it is a square and throws the Exception.
*/
public void check(int length, int weigth) throws Exception {
try {
if (length == weigth)
throw new IllegalRectangleException();
} catch (IllegalRectangleException e) {
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -