What is the difference between a checked exception and an unchecked exception in Java?
A. A checked exception is a runtime error, while an unchecked exception is a compile-time error.
B. A checked exception is a type of exception that must be caught or thrown, while an unchecked exception is not required to be caught or thrown.
C. A checked exception is a subclass of RuntimeException, while an unchecked exception is a subclass of Exception.
D. None of the above.
Answer:B
What is the difference between a checked exception and an unchecked exception in Java?
A. A checked exception is a runtime error, while an unchecked exception is a compile-time error. B. A checked exception is a type of exception that must be caught or thrown, while an unchecked exception is not required to be caught or thrown. C. A checked exception is a subclass of RuntimeException, while an unchecked exception is a subclass of Exception. D. None of the above.