This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes runtime exceptions?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "runtime exceptions??" Watch "runtime exceptions??" New topic
Author

runtime exceptions??

srikanth reddy
Ranch Hand

Joined: Jul 28, 2005
Posts: 252


since these are runtime exceptions they need not be handled or declared..from that i can remove options a and c ..also b is correct..
my doubt is regarding b...array and string index exceptions will be caught ...can the runtimeexecptions be caught ..??

iam missing somewhere

thanks
sri


Thanks & Regards<br /> <br />-Srikanth
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Yes of course all classes that extends from java.lang.throwable can be caught.

[ October 13, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Sandeep Chhabra
Ranch Hand

Joined: Aug 28, 2005
Posts: 340
Yes of course all classes that extends from java.lang.throwable can be caught.


Including Throwable itself.

try
{
throws Throwable;
}
catch(Throwable t)
{
//other code
}
[ October 14, 2005: Message edited by: Sandeep Chhabra ]

Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: runtime exceptions??
 
Similar Threads
Que from JQPlus!!
Exam Objectives Flow Control.
Catch RuntimeException
exceptions