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

Assignment Help:

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.


Related Discussions:- What can you do with an exception once you''ve caught it

Explain preemptive scheduling and time slicing, In preemptive scheduling, t...

In preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. In time slicing, a task i

Explain unicode in java, Explain unicode in java? Java uses the Unicode...

Explain unicode in java? Java uses the Unicode character set. It is a two-byte character code set which has characters representing almost overall characters in almost all huma

Talent agency system, Talent agencies like ICM, CAA and Paradigm represent ...

Talent agencies like ICM, CAA and Paradigm represent writers, directors and actors (among other talent).  These agencies take in hundreds of millions of dollars a year collecting 1

Session scope and Request scope, What is the difference among session scope...

What is the difference among session scope and request scope when saving formbean? Ans) When the scope is request, the values of formbean would be there for the current request.

Methods, I need the five methods public class Ex1Program { public void...

I need the five methods public class Ex1Program { public void start() { // Step 1. Declare and construct an array of 19 Movie objects (call the array films)

Explain the char data type in java, Explain the char data type in java? ...

Explain the char data type in java? A char is a single character in which a letter, a digit, a punctuation mark, a tab, a space or something same. A char literal is a single on

Explain try and catch exception in java, Explain try and catch exception in...

Explain try and catch exception in java? Why use exceptions instead of return values? 1. Forces error checking 2. Cleans up your code through separating the normal case from

How many ways are there to call a function in a program, How many ways are ...

How many ways are there to call a function in a program? Explain with example? Two Ways of Calling Functions: Functions do not run automatically. While the page loads, every

Constructors or destructors in java program, Consider the following Java de...

Consider the following Java definition of an integer list class. class IntegerList { private int[] list = new int[200]; private int size = 0; public boolean append(int value) {

JAVA Programming, Im not in the line of computer science.But i would like t...

Im not in the line of computer science.But i would like to have some knowledge about the computer language "JAVA".I aldredy learns the computer languages "C,C++".So kindly help me

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd