what is difference between Exception and Error?

Answer Posted / manikandan

Error occurs at runtime and cannot be recovered, Outofmemory
is one such example. Exceptions on the other hand are due
conditions which the application encounters such as
FileNotFound exception,ArrayIndexOutofBountException etc.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many threads can I run java?

539


Difference between static synchronization vs. Instance synchronization?

560


If I only change the return type, does the method become overloaded?

535


What are annotations in java?

619


How do you empty a list in java?

536






what is encapsulation in java? Explain

661


Does java support function overloading, pointers, structures, unions or linked lists?

605


Write a java program to generate fibonacci series ?

568


What is the purpose of sizeof operator?

532


In a class implementing an interface, can we change the value of any variable defined in the interface?

559


When is the finalize() called?

696


Can we use different return types for methods when overridden?

554


Write a program to find the whether a number is an Armstrong number or not?

573


Is there any limitation of using inheritance?

569


How does thread synchronization occurs inside a monitor?

548