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 collection class in java? List down its methods and interfaces.
When does an object becomes eligible for garbage collection in java?
What is Garbage Collection in Java
What is the use of default method in interface in java? Explain
Does substring start with 0?
What types of index data structures can you have in java?
Give a brief description of java socket programming?
If you are given the name of the function at run time how will you invoke the function?
Does treeset allow null in java?
Explain about collection interface in java?
What are thread groups?
How many ways can you break a singleton class in java?
How many bits is a 64 bit byte?
What are serialization and deserialization?
What is n in java?