What can you do with an exception once you''ve caught it, JAVA Programming

What can you do with an exception once you've caught it?

1. Fix the difficulty and try again.
2. Do anything else instead.
3. Exit the application along with System.exit()
4. Rethrow the exception.
5. Throw a latest exception.
6. Return a default value (in a non-void method).
7. Eat the exception and return from the techniques (in a void method).
8. Eat the exception and continue in the similar method (Rare and dangerous. Be extremely careful if you do this. Novices almost always do this for the wrong reasons. Do not simply to prevent dealing with the exception. Commonly you should only do this if you can logically guarantee in which the exception will never be thrown or if the statements inside the try block do not required to be executed correctly in order for the next code to run.)

Printing an error message through itself is generally not an acceptable response to an exception.

Posted Date: 5/16/2013 2:54:57 AM | Location : United States







Related Discussions:- What can you do with an exception once you''ve caught it, Assignment Help, Ask Question on What can you do with an exception once you''ve caught it, Get Answer, Expert's Help, What can you do with an exception once you''ve caught it Discussions

Write discussion on What can you do with an exception once you''ve caught it
Your posts are moderated
Related Questions
Develop a rfid based student attendance system include biometrics Project Description: The aim of our project is using rfid technology student attendance has to be taken. whe

A point-to-point model is based on the concept of a message queue: Senders send messages into the queue, and the receiver reads messages from this queue. In the point-to-point mode

In pre-emptive scheduling, the highest priority task implements until it enters the waiting or dead states or a higher priority task comes into existence. In time slicing, a tas

I need to code using java in netbeans for my dissertation which is in data mining domain...deals with privacy preserving of sensitive rules or items using association rule hiding

A Queue of Cards You are going to parallel the development done in the lesson on inheritance where we constructed some base classes, StackNode and Stack, and derivedĀ  Floa

What are separators in java? Separators help elaborates the structure of a program. The separators used within HelloWorld are parentheses, ( ) , braces, { } , the period, .

You can declare a variable by the var statement such as: var strname = some value You can also declare a variable with simply assigning a value to the variable. Although, if

What is meant through semantic error? It is an error that a developer encounters while a statement is executed but it was not intended through him (the developer). Such errors ar

The significant methods of ActionForm are: validate () & reset ().