A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
Need help in Exceptions
Saroja Eshwar
Greenhorn
Joined: Oct 26, 2007
Posts: 10
posted
Nov 26, 2007 03:11:00
0
Which are most typically thrown by an API developer or an application developer as opposed to being thrown by the JVM? (Choose all that apply.)
A).
ClassCastException
B).
IllegalStateException
C).
NumberFormatException
D).
IllegalArgumentException
E).
ExceptionInInitializerError
How to know whether the Exception is thrown by API developer or JVM
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35257
7
posted
Nov 26, 2007 03:14:00
0
Please
QuoteYourSources
.
Android apps
–
ImageJ plugins
–
Java web charts
Anders Hermansen
Greenhorn
Joined: Nov 15, 2007
Posts: 6
posted
Nov 26, 2007 05:19:00
0
I just asked a question almost about the same object.
There i asked if it is right to think of a JVM thrown exception as a RunTimeException and a programatically thrown exception as a checked exception.
If it is, then the correct answer is B and D.
And not C even though K & B in their book on
SCJP
states that
NumberFormatException
is typically thrown programatically. The JAVA API states that
NumberFormatException
is a
RuntimeException
.
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Need help in Exceptions
Similar Threads
SCJP question.
Exception ..
RunTimeException or checked Exception?
Exception: Programmtically or by JVM?
Exceptions thrown programatically or by JVM?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter