Answer Posted / sandeep tyagi
The functional diiference, in terms of the compiler, is
that you don't have to declare errors in throws clauses on
methods, or catch them.
Conceptually, an Error means something has gone wrong with
your program, which should usually give up and crash,
whereas an exception is for an unusual situation that you,
as a programmer, anticipated as a possibilty. So, for
example, a divide-by-zero is an Error, but attempting to
read a file and finding it doesn't exist is an Exception.
| Is This Answer Correct ? | 78 Yes | 55 No |
Post New Answer View All Answers
What is tree in java?
What is thread life cycle in java?
Explain the concept of hashtables?
What does the “static” keyword mean? Can you override private or static method in java?
Explain about exception propagation?
String class is defined under which package in java?
What is the difference between static and global variables and also define what are volatile variables?
If I only change the return type, does the method become overloaded?
When is the arraystoreexception thrown?
What is the tradeoff between using an unordered array versus an ordered array?
Is null a keyword in java?
What is difference between equal and == in java?
Is char a data type in java?
Can we declare a class as abstract without having any abstract method?
How do you input a string in java?