Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

throw and throws  RSS feed

 
vignesh kaladi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
What is the diff. between the throw and throws
 
Srinivas Tuta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

using throw you can throw an exception.

when u say a method throws an execption, u are reporting the compiler that the method is capable of throwing an exception, which you are not catching.


Srinivas
SCJP1.4
[ February 02, 2006: Message edited by: Srinivas Tuta ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!