Question: This programming assignment involves learning about some common exceptions which occur in Java programs. Consider the following exception types: Null Pointer Exception Array IndexoutOfBoundsException ClassCastException

 This programming assignment involves learning about some common exceptions which occur

This programming assignment involves learning about some common exceptions which occur in Java programs. Consider the following exception types: Null Pointer Exception Array IndexoutOfBoundsException ClassCastException IllegalArgumentException Research what each exception type means and the conditions under which each occurs (thrown). Then write the following programs, one for each of the above-listed exception types: A program which throws the exception (with a throw statement) and catches it displaying information about the exception. Name your programs Thrown.java is the name of the exception involved for example NullpointerExceptionThrown.java. A program which causes the exception to be thrown (nor with a throw statement) and catches it displaying unique information about the exception (ex. Name of class and method causing the exception). For example, for the NullPointerException, have your program create a situation which would cause this exception to be thrown. Name your programs Catch.java is the name of the exception involved for example NullPointerExceptionCatch.java. At the end you should have eight programs, four Thrown.java and four Catch.java. Submit the source code in a zip file named as follows: Assignment9_ followed by your first name initial, followed by your last name, followed by your course section number. For example, if your name is Jane Smith and you are in section 81, your zip file's name would be Assignment9Jsmith81.zi. Please also state how to compile from command prompt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!