⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 illegalrectangleexception.java

📁 此程序可实现:在可视化界面中随即生成一些图形(长方形、椭圆、圆、正方形);程序会自动告诉你所生成的图形的形状并计算这些图形的面积;最后程序会自动统计各个图形的分布。
💻 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 + -