Answers for "throw checked exception java"

3

throw error java

throw new java.lang.Error("this is very bad");
throw new java.lang.RuntimeException("this is not quite as bad");
Posted by: Guest on March-21-2021
0

how to handle checked exceptions in java

I would either handle or declare. I Declare using THROWS keyword or handle by
using TRY&CATCH block. If I will use it again I would handle it. If it will
occur only once than I would use THROWS keyword
Posted by: Guest on November-29-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language