• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Exception

 
suja changanam
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This Question is from Whizlab

Which of the following exceptions are NOT thrown by JVM?
A. IllegalArgumentException
B. IllegalStateException
C. ArrayIndexOutOfBoundsException
D. StackOverflowError
E.NumberFormatException

Answer is A,B,E.

I think all of the given exceptions are thrown by JVM,I'm not able to understand the question,please help me.
Thank in advance
suja
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The SCJP study guide has a page or two dedicated to explaining this concept. You can go through that to get a better picture.
 
mohan kumar r
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Others are subclasses of RuntimeException that your program is expected to catch. Your program is catching becuase you did a mistake while programming and your program is throwing those exceptions.

StackOverFlowError is a subclass of java.lang.Error( refer API tree) .Represents system errors that your program is not expected to catch.So who will catch and throw that exception if there is any such errors,the JVM
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Exceptions A,B,E are checked exceptions. programmer expected to handle that type of Exceptions .

Hope This Helps
 
suja changanam
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all,i got it
suja
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic