• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

runtime exceptions??

 
srikanth reddy
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes of course all classes that extends from java.lang.throwable can be caught.

[ October 13, 2005: Message edited by: Srinivasa Raghavan ]
 
Sandeep Chhabra
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic