exception.java

来自「一个学籍管理系统。」· Java 代码 · 共 29 行

JAVA
29
字号
/* Exceptions */

class StudentNotFoundException extends Exception
{
	StudentNotFoundException(String Name)
	{
		System.out.println("Student "+Name+" not found!");
	}
	StudentNotFoundException(int ID)
	{
		System.out.println("Student "+ID+" not found!");
	}
}

class SameStudentIDException extends Exception
{
	SameStudentIDException(int ID)
	{
		System.out.println("ID "+ID+"has been register by others!");
	}
}

class NoSuchEventException extends Exception
{
	NoSuchEventException()
	{
		System.out.println("No such event defined!");
	}
}

⌨️ 快捷键说明

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