Look up the following exception classes in the online Java API documentation and describe their purpose:
What will be an ideal response?
a. ArithmeticException
This exception is thrown when an exceptional arithmetic condition occurs, such as dividing by zero.
b. NullPointerException
This exception is (most commonly) thrown when attempting to call an instance method of a null reference. It occurs in other situations as well, such as attempting to throw a null reference.
c. NumberFormatException
This exception is thrown when an application attempts to convert a string into a numeric value, but the string does not have the proper format.
d. PatterSyntaxException
This exception is thrown when a syntax error occurs in the pattern of a regular expression.
You might also like to view...
Answer the following statements true (T) or false (F)
1. A questionnaire is an excellent means of doing an in-depth analysis of a manager's decision-making processes. 2. Using questionnaires is useful for doing exploratory studies to gauge overall opinion. 3. Questionnaires are useful in providing the analyst with interactive feedback. 4. Validity is the degree to which the question measures what the analyst intends to measure.
How would you build a class so that it maintains the persistence property of object-oriented programming?
What will be an ideal response?
Which X Window component controls hardware components and gives client applications access to hardware?
A. Monitor B. Client C. Server D. Display server
Sometimes you want to take action when one or the other of two conditions is true, this type of compound condition is called a(n) ____ decision.
A. AND B. OR C. NOR D. NOT