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


Please Help Members By Posting Answers For Below Questions

Explain 5 io best practices?

824


Explain the polymorphism principle?

807


What occurs when an object is constructed?

797


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

877


What are streams in java 8?

790


Why is singleton not thread safe?

863


Why is boolean important?

827


What does += mean in java?

825


Explain the public class modifier?

736


What does escaping a character mean?

748


Can a string be null?

768


List the interfaces which extends collection interface?

755


What do you mean by flow of struts?

1028


Can we create an object of private class?

763


Whats the difference between notify() and notifyall()?

817