Difference between error and exception

Answers were Sorted based on User's Feedback



Difference between error and exception..

Answer / rams

The mistakes in the syntax are resulted as errors
the mistakes in the logic of a program resulted as exceptions.

Is This Answer Correct ?    16 Yes 1 No

Difference between error and exception..

Answer / modi

An error is an irrecoverable condition occurring at runtime.
Such as OutOfMemory error. These JVM errors and you can not
repair them at runtime. While exceptions are conditions that
occur because of bad input etc. e.g. FileNotFoundException
will be thrown if the specified file does not exist. Or a
NullPointerException will take place if you try using a null
reference. In most of the cases it is possible to recover
from an exception (probably by giving user a feedback for
entering proper values etc.).

Is This Answer Correct ?    3 Yes 0 No

Difference between error and exception..

Answer / chitraraman

Error in java means the mistake done buy the programmer
logically or syntatically.
Exception is an error thrown by java impllctly like
IOException,Array out of bound Exception

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Core Java Interview Questions

Is java a security risk?

0 Answers  


What are daemon Threads in java?

0 Answers   Impetus,


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

0 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


What primitive Java types? Howmany are they and what are their names?

3 Answers  






how to connect two diffrent applet files

0 Answers  


How java uses the string and stringbuffer classes?

0 Answers  


What is the role of the java.rmi.naming class?

0 Answers  


what is difference between abstract and interface? can i give real time example for the two topics?

7 Answers  


What is currentthread()?

0 Answers  


What are void pointers?

1 Answers  


Explain how hashmap works?

0 Answers  


Categories