aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes About a clause in MC selection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "About a clause in MC selection " Watch "About a clause in MC selection " New topic
Author

About a clause in MC selection

anson chau
Greenhorn

Joined: Jan 01, 2007
Posts: 10
what exactly is meant by 'An Exception is thrown at runtime?"

(A) A RuntimeException(ONLY exception that extends RuntimeException) will be thrown ?

(B) An Exception is thrown at program running time, no matter it is unchecked or checked.

Thank you.
[ January 07, 2007: Message edited by: anson chau ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I take that to mean 'B'.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Paul Lachance
Greenhorn

Joined: Nov 27, 2006
Posts: 10
Isn't it also true that any exception thrown at runtime will also extend RuntimeException (whether progammer or JVM initiated)? I would think both A and B are implied...
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Paul Lachance:
Isn't it also true that any exception thrown at runtime will also extend RuntimeException (whether progammer or JVM initiated)? I would think both A and B are implied...

No. Runtime is the only time your code can throw anything.

RuntimeException is simply a subclass of Exception, and serves as a distinction between checked and unchecked exceptions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About a clause in MC selection