Question: what is the difference between runtime exception and compile time exceptions?
Answer: RuntimeException vs Checked Exception in Java Main difference between RuntimeException and checked Exception is that It is mandatory to provide try-catch or try finally block to handle checked Exception and failure to do so will result in compile-time error, while in case of RuntimeException this is not mandatory.