aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes which is the correct  option 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 "which is the correct  option" Watch "which is the correct  option" New topic
Author

which is the correct option

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
Which statement is true?
A. catch(X x) can catch subclasses of X.
B. The Error class is a RuntimeException.
C. Any statement that can throw an Error must be enclosed in a try block.
D. Any statement that can throw an Exception must be enclosed in a try block.
E. Any statement that can throw a RuntimeException must be enclosed in a try
block.

can any one tell me the answer of this question?
thanks in advance


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208
A. catch(X x) can catch subclasses of X.
True

B. The Error class is a RuntimeException.
No , this is like OutOfMemoryException

C. Any statement that can throw an Error must be enclosed in a try block.
I think , No

D. Any statement that can throw an Exception must be enclosed in a try block.
Only checked Exceptions , like IOException

E. Any statement that can throw a RuntimeException must be enclosed in a try
block.
No , Like NullPointerException

Make me correct if i am wrong on any point
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
One similar thread.
Parambir Singh
Ranch Hand

Joined: Sep 05, 2004
Posts: 40

Ram, I think you are right.


SCJP, SCMAD
http://parambir.me
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Yes only A is correct


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: which is the correct option
 
Similar Threads
on exception
Exception
Question on exercise about Exception
got struck with a question. please help me friends.
Exception Question