What is exception and error? and what is the difference
between them?
Answer Posted / krishnakanth
Exception and Errors are two subclasses of Throwable Class.
Exception:-Exception can be devided into two other groups.
Checked Exceptions and Unchecked Exceptions.
Checked Exceptions are the User defined exceptions and it
must be caught by the user.(Eg:IOException etc.)
Unchecked Exceptions are the subclasses of Runtime
Exception.(Eg:FileNotFound Exception,Division by Zero etc.)
Errors:-Errors are the external interrupts that terminates
the execution of the program.That means Errors ate out of
user control.It can't be catched by the user.(Eg:
OutOfMemory Exception etc.)
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
what is object-oriented programming in java?
What is array sorting in java?
Can an object subclass another object?
What are runtime exceptions?
Can you add null to a list java?
What is a treeset class?
How do you achieve singleton?
What is bifunction in java?
Why collection is called framework in java?
Discuss about garbage collector in Java.
Explain about doubly linked list
What are design patterns and please explain?
What is purpose of applet programming?
How many bytes is double?
What sorting algorithm does javascript use?