what is difference between Exception and Error?

Answer Posted / mukesh kumar

Exceptions are abnormal condition that occur at run time and
it can be handle through try catch block.
Errors are those abnormal condition that occur at compile
time and can not be handle. Error terminates the program
whereas exception does not terminate program directly, it
provide chance to handle that abnormal condition.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a class extend 2 classes in java?

562


What two classes are used to read data only?

645


What is the Scope of Static Variable?

734


Explain how hashmap works?

596


What is the main advantage of passing argument by reference?

507






Can we have two main methods in a java class?

542


Why is java called java?

545


Is java a digit method?

520


What are thread local variables?

558


If you do not want your class to be inherited by any other class. What would you do?

565


Write a java program for binary search?

611


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

557


Explain public static void main(string args[]) in java.

537


How many types of threads are there in java?

506


What are the different http methods?

538