Home > Software > Java > Core-Java
Interview Questions   Tutorials   Discussions   Programs   

Core-Java - What is difference between Exception and Error?

asked marvit August 16, 2014 09:55 AM  

What is difference between Exception and Error?


1 Answers

answered By bhjahnavi   0  
An error is an irrecoverable condition occurring at run time.Such as OutOfMemory error.these JVM errors and you can not repair them at runtime . While exceptions are conditions that occur because of bad input etc. e.g. FileNotFoundException will be thrown if the specified file does not exit, or a NullPointerException will take place if you try using a null reference. in most of the cases it is possible to recover from an exception.
   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!