What is the difference between exception and error?
Ans: The exception class defines mild error conditions that your program encounters.Ex: Arithmetic Exception, FilenotFound exception Exceptions can occur when try to open the file, which does not exist the network connection is disrupted operands being manipulated are out of prescribed ranges the class file you are interested in loading is missing. The error class defines serious error conditions that you should not attempt to recover from. In most cases it is advisable to let the program terminate when such an error is encountered. Ex: Running out of memory error, Stack overflow error.