how can u handle run time exception in java? explain with
brief explanation with examples?
Answer Posted / pavithra
Runtime exceptions represent problems that are detected by
the runtime system. This includes arithmetic exceptions
(such as when dividing by zero), pointer exceptions (such
as trying to access an object through a null reference),
and indexing exceptions (such as attempting to access an
array element through an index that is too large or too
small).
Runtime exceptions can occur anywhere in a program and in a
typical program can be very numerous. Typically, the cost
of checking for runtime exceptions exceeds the benefit of
catching or specifying them. Thus the compiler does not
require that you catch or specify runtime exceptions,
although you can.
| Is This Answer Correct ? | 5 Yes | 8 No |
Post New Answer View All Answers
What do you know about the garbage collector in java?
What is multi-catch block in java?
What is the purpose of default constructor?
what is the use of bean managed and container managed with example?
What are the disadvantages of using inner classes?
What is nested class?
Why put method is idempotent?
Can java list be null?
What is the difference between keyword and identifier?
What is thread count in java?
Why is stringbuffer not immutable?
What do you mean by jjs in java8?
Can we declare main () method as non static?
Can we clone singleton class in java?
Difference between java and javascript