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 state does a thread enter when it terminates its processing? : Java thread
What are basic keywords?
What are the different types of data structures in java?
Can bool be null?
What is the difference between the paint() and repaint() methods in java programming?
What is parse method?
What is the difference between abstract classes and interfaces?
Can we define a package statement after the import statement in java?
Explain about class in java?
Why does java not support pointers?
What is final keyword in java? Give an example.
What is the purpose of the strictfp keyword?
What are the access modifiers in java?
What do u mean by variable?
can java object be locked down for exclusive use by a given thread? : Java thread