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 is the difference between the font and fontmetrics classes in java programming?
How to sort elements in a parallel array in java?
Why is flag used in java?
Is ++ operator is thread safe in java?
Where import statement is used in a java program?
What is the size of boolean variable?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
How do you sort a set in java?
Can a class have more than one object?
What are the important features of Java 8 release?
What is the purpose of garbage collection in java? When is it used?
Why singleton pattern is better than creating singleton class with static instance?
What is a java developer salary?
Name few java.lang classes introduced with java 8 ?
What is parsing and its types?