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

Exception handling in EJB, Java has two kinds of exceptions: 1. Checked ...

Java has two kinds of exceptions: 1. Checked exception: handled from java.lang.Exception but not java.lang.RuntimeException. 2. Unchecked exception: handled from java.lang.Ru

How can you define a consistent web design, How can you define a consistent...

How can you define a consistent web design? Why is it needed? A consistent excellent designed website is generated for common public which permits users to attain what they nee

What is the role of fonts in java explain with example, What is the role of...

What is the role of fonts in java explain with example? You've already seen one instance of drawing text in the HelloWorldApplet program of the last chapter. You call the drawS

Assignments, Define a function that will take a box type of object as argum...

Define a function that will take a box type of object as argument and return a box object whose dimension is 10 times more than the object

What is constructor, What is Constructor? A constructor is used to init...

What is Constructor? A constructor is used to initialize a newly created object. It's called just after memory is allocated for the object. It can be used to initial

Describe interfaces in java langauge, Describe Interfaces in java langauge?...

Describe Interfaces in java langauge? Interfaces are the further level of abstraction. An interface is like a class along with nothing but abstract methods and final, static fi

List down the names of two array techniques available java, List down the n...

List down the names of two array techniques available in JavaScript. The two techniques thata rae available in java script is: 1. sort( ) [sorts elements within alphabetical

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