Fill in the blanks:
A ___ occurs when a program recurses too deeply into an infinite loop,
while a(n) ___ occurs when a reference to a nonexistent object is acted upon.
B.
A StackOverflowError occurs when a program recurses too deeply into an infinite loop.
It is considered an error because the JVM often runs out of memory and cannot recover.
A NullPointerException occurs when an instance method or variable on a null reference is used.
For these reasons, Option B is correct.
A NoClassDefFoundError occurs when code available at compile time is not available at runtime.
A ClassCastException occurs when an object is cast to an incompatible reference type.
An IllegalArgumentException occurs when invalid parameters are sent to a method.