Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exceptions

 
challa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A method can return an Exception

Is it true? If so why ? Can anyone explain
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes , It is true .

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

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
constructor also can throw exceptions ...
[ April 09, 2005: Message edited by: rathi ji ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic