File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JVM Thrown Exceptions/Programmatically thrown exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "JVM Thrown Exceptions/Programmatically thrown exceptions" Watch "JVM Thrown Exceptions/Programmatically thrown exceptions" New topic
Author

JVM Thrown Exceptions/Programmatically thrown exceptions

Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131
Hi all!
I am not sure rogrammatically thrown exceptions is checked exceptions and JVM Thrown Exceptions is unchecked exceptions.
Is that right?
Thanks in advance!


who dare win!<br />SCJP5(94%)|SCWCD5(86%)|SCBCD(100%)|SCEA in progress
Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131
hi!
Additional question:
How can i distinguish which exception is checked exception and which one is unchecked exception?
Thanks in advance.
Kishore Kumar
Ranch Hand

Joined: Oct 15, 2007
Posts: 71
Hi,
RuntimeException and all the Exceptions that extend RuntimeException comes under Unchecked Exceptions. The rest are Checked Exceptions.
Kelvin Chenhao Lim
Ranch Hand

Joined: Oct 20, 2007
Posts: 513
Hi Fudong,

No, the "programmatic-vs-JVM" distinction isn't the same as "checked-vs-unchecked". Interestingly, this question actually came up a few times recently, so let me copy and paste something I posted a few weeks ago that might help a little:

I'm not a fan of the term "thrown programmatically" as a supposed contrast to "thrown by the JVM". In my opinion, it's much clearer to think of it as "thrown explicitly" (a.k.a. "programmatically") versus "thrown implicitly" (a.k.a. "by the JVM").

Using this terminology, an "explicitly thrown" exception is one that can only be thrown in Java code using a "throws" or "assert" statement, i.e. there must be some expression of programmer intent to (possibly) cause an exception at that point. On the other hand, an "implicitly thrown" exception is one that can occur even in expressions that have neither a "throws" or "assert". Most of these are the result of abruptly completed evaluations, e.g. dereferencing a null reference or an integer division by zero.

Hopefully this way of differentiating exceptions will help clarify this concept. Also, it may be helpful to read what the JLS has to say about the causes of exceptions.


SCJP 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM Thrown Exceptions/Programmatically thrown exceptions