What exception type does the following program throw?
```
public class Test {
public static void main(String[] args) {
Object o = null;
System.out.println(o.toString());
}
}
```
a. ArithmeticException
b. ArrayIndexOutOfBoundsException
c. StringIndexOutOfBoundsException
d. ClassCastException
e. NullPointerException
e. NullPointerException
You might also like to view...
When should you make a method static?
What will be an ideal response?
Repeat Exercises 27.22 to 27.28 but produce a schema using the functional data model. Diagramatically illustrate each schema.
(a) Hotel case study. (b) University Accommodation Office case study
A hard drive or SSD can be divided into partitions. What is the maximum number of primary partitions that can be used on these devices?
A. 4 B. 8 C. 16 D. 32
A polymorphic method
a) has multiple implementations within the same class definition. b) is uniquely identified by the data types of its arguments. c) can be used in a subclass if it’s not used in a base class. d) has the same name as another method within the same class hierarchy.