QUESTION #1 (SELF-CHECK)
SOLUTIONS
a)
The word pointer is another word for reference.
b)
A null pointer exception is a(n) error that occurs when you try to use an
object that has not been created yet.
c)
The default value for integers in arrays is 0.
d)
The default value for all objects in arrays is null.
e)
What will the following code output? null (because Strings are
objects)
String[] arr = new String[4];
System.out.println(arr[0]);
|