📝️ What is a Java Exception?
An exception is an event that disrupts/alter the normal flow of an application
📝️ What is the java.lang.Throwable class?
It’s the Java superclass for all objects that represent an Exception event.
📝️ What are the key subclasses of Throwable
(Exception-types)?
📝️What does the 💥️Error💥️ class represents (examples)?
📝️ What does 💥️Checked Exception💥️ mean in Java?
📝️ What is an 💥️Unchecked Exception💥️ class?
o An Unchecked exception is a RuntimeException or any of its subclasses.
o It does NOT have to be handled nor declared.
o This kind of exceptions can be thrown by the JVM itself or the programmer code.
What Exception classes…
are Catcheable or Have to be Declared (Table)?
👉️ Error |✅|✅| ⚠️ You shouldn’t but you can
👉️ Unchecked Exc. |✅|✅| ❓️ You can but you don’t have to
👉️ Checked Excep |✅|✅| 💪️You have to
📝️ What does the 💥️HANDLE OR DECLARE💥️ rule means?
It means that Checked Exceptions should be handle or declared
👉️ handle -> 🕵♂️️’throw’ Wrapped in compatible try and catch blocks
👉️ declared -> 🕵♂️️’throws’ Defined that this method ‘throws’ a certain exception in the method signature …(someone else will handle it.)
📝️ What are the keywords used to declare and delegate exception handling (when)?
📝️ What is the ‘throw’ keyword used for?
o It’s used to declare a new exception (throw) or re-throw an existing one.
-> It goes as an statement inside a code block.
📝️ What does throws statement mean in java?
-> The throws keyword indicates that a certain method can potentially “throw” an specific exception.