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

Url instance and url connection instance, Difference between URL instance a...

Difference between URL instance and URL Connection instance? Ans) A URL instance shows the location of a resource, and a URL Connection instance shows a link for accessing or co

JAVA IF/ ELSE, #This assignment will give you practice with interactive pro...

#This assignment will give you practice with interactive programs, if/else statements and methods that return values. You are to write a program that prompts the user for informati

Socket Programming, Task back to top Write a JAVA GUI program that would f...

Task back to top Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA soc

Test the applet sample , Obtain ONE of the sample applets from Sun Microsys...

Obtain ONE of the sample applets from Sun Microsystems' Applets page, or any other source for free Java applets you may wish to use. Test the applet, and link it to Part 2 of your

What is an advice, Advice is the execution of an aspect. It is something li...

Advice is the execution of an aspect. It is something like telling your application of a new behavior. Generally, and advice is inserted into an application at joinpoints

Difference between inheritance and polymorphism, Question 1: a) What is...

Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

What is a java package and how is it used, A Java package is a naming conte...

A Java package is a naming context for classes and interfaces. A package is used to make a separate name space for groups of classes and interfaces. Packages are also used to arran

Difference between boolean & operator and && operator, How can we define th...

How can we define the difference between the Boolean & operator and the && operator ?

What is file transfer protocol, What is File Transfer Protocol? This pr...

What is File Transfer Protocol? This protocol is used to upload the files on remote computers. This is used to transfer files among computer on TCP/IP network e.g. internet and

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