what is the difference between error and exception?
Deepak Verma
Error: This is the syntax problem, which leads to complation problem.Exception:- This is the run time error which interrupts the application execution. (These can be the exceptional cases were the applications logic fail or should fail eg devided by zero).
Error: This is the syntax problem, which leads to complation problem.
Exception:- This is the run time error which interrupts the application execution. (These can be the exceptional cases were the applications logic fail or should fail eg devided by zero).
Error: In the terms of programming language, error is include only the compile time such as syntax error .That cant not be handle by any Handler. Exception:In the terms of programming language,exception is a logical error such as Stack overflow, array unbounded, one/zero and etc. All the logical error handle by the exception handler such as try-catch ,throws etc.
Exceptions are those which can be handled at the run timewhere as errors cannot be handled.Examples for exceptions: Array out of bonds, attempt todivide by zero ,etc.Exceptions can be handled by handlers using try - catch.