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 the method in java?
What checkbox method allows you to tell if a checkbox is checked?
What is another word for methodology?
What is json parser in java?
When we serialize an object does the serialization mechanism saves its references too?
What do you mean by static variable?
How is final different from finally and finalize?
What is literal example?
Can singleton class be serialized?
How to print an arraylist in java?
Is it safe to install java on my computer?
What is the impact of declaring a method as final?
What are the two types of exceptions in java? Which are the differences between them?
Why is method overloading not possible by changing the return type in java?
Can you override a final method?