Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checked and uncheked exceptions

 
Palash Kumar
Ranch Hand
Posts: 33
MyEclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which exceptions are checked and whic are unchecked, i should know for the SCJP6.....

Are unchecked exceptions are sublass of RuntimeException...?
 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unchecked exceptions are subtypes of RuntimeException.
Subtypes of Error are also considered unchecked.
Everything else is checked.

Yes, you need to know this, and what exceptions are which, for the exam.

If you have K&B (or any other decent study book) that will contain a full description of the important excpetions, including which ones are thrown by the JVM and which ones programmatically (you need to know that too).
 
Palash Kumar
Ranch Hand
Posts: 33
MyEclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have studied K&B...
is there any relation between JVM thrown exception and Checked/unchecked ones...?

please can you enlist checked and unchecked exceptions
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's all in the K&B book. I made a simple class diagram detailing all this information for myself. You could do the same (me just giving it to you is not as much value as you doing it yourself).

You want Chapter 5, Objective 2.6. On page 386 (SCJP6) there is an excellent table that covers almost everything.
 
Palash Kumar
Ranch Hand
Posts: 33
MyEclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys
 
Stephen Davies
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the JAVA API, starting at java.lang.Throwable or java.lang.Exception. This will also help you understand the Exception Hierarchy more also, and differentiate between Checked and unchecked Exceptions.

 
Jeena Jeen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I do understand the difference between checked and unchecked Exception.
But i don't understand the relation of checked/unchecked Exception with JVM and Programmatically thrown Exceptions.

Is it true that:
JVM Exception: Unchecked Exception(Runtime)
Programmatically thrown Exception : Checked/ Unchecked.

In K&B all the examples of Programmatically thrown Exception are Unchecked Exceptions. Does all of the checked Exception comes under Prog Thrown Exception??

 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it true that:
JVM Exception: Unchecked Exception(Runtime)
Programmatically thrown Exception : Checked/ Unchecked.


Yes, JVM exceptions are unchecked, programmatic exceptions can be checked or unchecked...
 
Jeena Jeen
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic