Error means something that has gone wrong with your program which we
can not overcome, whereas an exception is for an unusual situation that we will face in a code.So, for example, tack overflow,underflow
are examples of Error, but attempting to read a file and finding it doesn't exist,a divide-by-zero are examples of Exception.So Exception we can handel by putting that part of code which we are anticipating some exception may occur,in try and catch block.But error we can't handel explicitly where as exception we can.