|
|
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 4 of 8
Overflow and Underflow classes. Because overflow and underflow exceptions indicate flawed code, they represent unchecked exceptions. That implies
Overflow and Underflow subclass RuntimeException, as the following code fragment demonstrates:class Overflow extends RuntimeException
{
}
class Underflow extends RuntimeException
{
}
Because Overflow and Underflow lack duplicate code, you neither need to introduce a new class that extends RuntimeException nor have Overflow and Underflow subclass that new class.
The previous section referred to throwing an exception object. What does that phrase mean? For an answer, consider this: When the JVM detects an unchecked exception, the JVM creates and
initializes an exception object. In contrast, when a program or library detects either a checked or unchecked exception, the
program/library code creates and initializes an exception object and uses the throw statement to pass that object to the JVM. The throw statement has the following syntax: