This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in Exception" Watch "Doubt in Exception" New topic

Doubt in Exception

suja changanam

Joined: Sep 27, 2007
Posts: 12
This Question is from Whizlab

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

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
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

The SCJP study guide has a page or two dedicated to explaining this concept. You can go through that to get a better picture.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
mohan kumar r
Ranch Hand

Joined: Jan 19, 2006
Posts: 38
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

Joined: Jan 28, 2008
Posts: 5575

The Exceptions A,B,E are checked exceptions. programmer expected to handle that type of Exceptions .

Hope This Helps
suja changanam

Joined: Sep 27, 2007
Posts: 12
Thanks to all,i got it
subject: Doubt in Exception
It's not a secret anymore!