what are Checked & Unchecked exceptions ?

Answer Posted / harmeet

Checked Exceptions must be caught and thrown by the user
otherwise compile time error will be displayed saying it
must be catched. We've to catch those exceptions using try
and catch blocks.
Eg:Class.forName() throws ClassNotFoundException, when
trying to load the specified file in class.forName().

whereas Unchecked Exceptions are handled by jvm, user need
not to handle those exceptions.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why char array is preferred over string for storing password?

591


What is the difference between I ++ and ++ I in java?

507


What is mutable object and immutable object?

632


How does the garbage collector works in java?

574


What is difference between ++ I and I ++ in java?

534






Can an interface be final?

550


Is integer immutable in java?

550


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

592


What is the basic of java?

573


What is difference between an object and a class?

615


design an lru cache in java?

546


Give us the name of the list layoutmanagers in java?

524


How do you find the absolute value?

564


What does string mean in java?

630


What kind of variables a class can consist of?

638