Throwing Exceptions
- Division by Zero Exception: You tried to divide 1/0, but we won't let you.
- Null Pointer Exception: You tried to access a non-existent object, but we won't let you.
- Stack Overflow Exception: You tried to push more elements onto the stack than it can hold, but we won't let you.
- Runtime Exception: You tried to do something that's not allowed, but we won't let you.
- Class Not Found Exception: You tried to use a class that doesn't exist, but we won't let you.
- Connection Reset Exception: You tried to connect to a non-existent resource, but we won't let you.
- Out of Memory Exception: You tried to allocate more memory than we have, but we won't let you.
- File Not Found Exception: You tried to read a file that doesn't exist, but we won't let you.
Learn about the different types of exceptions we won't let you throw.
Learn about how to catch and handle the exceptions we won't let you throw.