Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exceptions" Watch "Exceptions" New topic



Joined: Mar 28, 2005
Posts: 23
A method can return an Exception

Is it true? If so why ? Can anyone explain
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Yes , It is true .

Exception is ultimately an object so a method can return Exception also .

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
hi rathi
is there is anyother thing that will throw the exception.TO my knowledge only method will throw the exception.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
constructor also can throw exceptions ...
[ April 09, 2005: Message edited by: rathi ji ]
I agree. Here's the link:
subject: Exceptions
Similar Threads
Can the color for the disabled item be changed
WA #1.....word association
Private methods
error in Marcus Green 2.