what is difference between Exception and Error?

Answer Posted / chandra sekhar dash

Exceptions are also one kind of errors which we can hadle at
both compile time and run time by using try and catch
blocks.
These are two types: Compile time and runtime.
Sql and IO Exceptions come under compile time
ArrayIndexOutofbounds and NullPointer these come under
runtime Exceptions

Errors are the problems which we cant hadle, like stack
overflow and memoryoutofbounds etc.,these generally comes at
compile time

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a boolean flag in java?

540


What is keyword and identifier?

605


How do you read and print a string in java?

507


Explain the importance of join() method in thread class?

614


Explain about arraylist?

557






What do you understand by copy constructor in java?

475


What is methods in java?

491


What is blank final variable?

549


How do you get length in java?

532


What is the return type of the main method?

548


Can an object subclass another object?

536


What is difference between ++ I and I ++ in java?

505


What is a instance variable in java?

522


What is a nullable field?

550


Which are the two subclasses under exception class?

498