Java ‘throws’ the result of an Exception to a specific section of code, a try-catch block. What...?
-
Java ‘throws’ the result of an Exception to a specific section of code, a try-catch block. What would be some alternatives? (Hint: consider the language ‘C, how does it handle errors’? Hint: maybe return a specific number denoting an error code inline with your code?) What is the result of that approach? Are there other approaches you might suggest?
-
Answer:
You just want to use this kind of structure in your try/catch code: try{ x = a/b; } catch(Kind Of Error You Are Receiving){ } There isn't really a way to circumvent this, other than using if/else statements, though that would be more complicated.
Studio at Yahoo! Answers Visit the source
Related Q & A:
- When i do a search and click on a result a get a page addressed rc10 overture what do i do?Best solution by Yahoo! Answers
- How can I block a specific web page?Best solution by Yahoo! Answers
- What substance has a specific heat that is higher than liquid water?Best solution by wiki.answers.com
- Can I block a specific phone number on my magic jack?Best solution by Yahoo! Answers
- What's a rhythm section?Best solution by en.wikipedia.org
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.