Discussion response java exceptions | Computer Science homework help

Please respond with a minimum of  at least 150 words

 

Sorting exceptions into two categories (namely “unchecked” and  “checked” exceptions) can significantly change how we handle exceptions  within our program. 

Checked exceptions are exceptions that occur at compile-time. These  exceptions occur due to factors or events that are outside of our  program’s immediate control–such as network issues, Input/Output device  issues, files not being found when called, etc. Checked exceptions must  either be dealt with inside of the method in which they are thrown, or  else they must be passed up to an exception handler in higher-up method  (by adding a “throws” clause in the method’s argument parameter).

Because of this ability to pass the exception to another method,  these types of exceptions have the potential to be ignored or  “swallowed” (as some of the material has dubbed), although this is not  recommended of course. These exceptions should be dealt with in some way  within our program wherever absolutely possible utilizing try-catch  blocks or try-catch-finally blocks.

Unchecked exceptions are exceptions that occur at run-time. These  consist of exceptions that deal with issues within our actual program  code (or possible issues due to the user’s interaction with our code).  Examples of these would be trying to access an element outside of a  specified array, attempting to divide a number by 0, or a user  attempting to input a letter or string into an input box designed to  accept an integer. 

These types of exceptions are dealt with on an “as-needed” basis, one  might could say, as they attempt to catch specific errors that can  spring up from the execution of buggy code. Thoroughly testing our code  and being aware of the different types of exceptions that could occur  within our code (and then properly handling them) can keep our code  functioning smoothly and efficiently. 

When it comes to which method I would prefer:

The geeksforgeeks.com website reads that throwing checked exceptions  may be a better option if the user has a decent amount of control over  recovering from the exceptions, and if not, unchecked exceptions are  better used. It also appears that checked exceptions can allow for more  robust code, although (as stated earlier), this does give programmers  the opportunity to pass the buck and not deal with certain exceptions  simply because they do not want to be thorough. But I also found from my  research that some languages (such as C#) do not have checked  exceptions, and that language appears to work well without them.

Reflecting upon my researching of this subject, (and my limited  experience utilizing exceptions in my own code in my last course), I  feel as though I would be more inclined to utilize unchecked exceptions,  when possible. I think it makes more sense to be able to address the  exceptions as needed rather than “covering the entire code with ‘throws’  clauses” as the infoworld.com website puts it. Although, I am totally  new to this realm, so I’m sure I’ll learn more as I go!

Thanks for reading, all and best of wishes in the module!

Academic Brigade
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.