

class Apr5 {

	public static void main(String[] args) {

		try {  // required because Student constructor throws exception that extends Exception
			Student s1 = new Student("joe");

			Student s2 = new Student(null);

			System.out.println(s1);
			System.out.println(s2);
		}
		catch (InvalidDataException e) {
			System.out.println("exception caught");
		}
		catch (InvalidDataException2 e) {
		    System.out.println("different exception caught");
		}

	}
}

