what is difference between Exception and Error?

Answer Posted / shivaprasad

Exceptions are those which can be handled at the run time
where as errors cannot be handled.
Examples for exceptions: Array out of bonds, attempt to
divide by zero etc.
Exceptions can be handled by handlers using try - catch.

Is This Answer Correct ?    279 Yes 48 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does string [] args mean?

533


How can we break singleton in java?

514


Where will it be used?

1496


What is output buffer?

558


When can we say that threads are not lightweight process in java?

584






Which is better stringbuilder or stringbuffer?

521


What is instance synchronization?

530


Differentiate between postfix and prefix operators in java.

630


Can we restart a dead thread in java?

544


What are assembly attributes?

537


Can we pass null as argument in java?

499


If system.exit (0); is written at the end of the try block, will the finally block still execute?

609


Why string is not thread safe?

526


What is the use of StringTokenizer class?

603


What is public/private protected in java?

534