0

What is the difference between throw and throws?

throw and throws are the keyword

11th Apr 2017, 10:06 AM
Bineeta Rawat
Bineeta Rawat - avatar
4 Answers
11th Apr 2017, 10:11 AM
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender)
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender) - avatar
+ 1
you use throw when you want to throw an execption as statement, you use throws when you mark a method that may throw an execption for warning user to handle that exception witg try and catch
11th Apr 2017, 11:42 AM
η=sqrt(Ό/Δ)
η=sqrt(Ό/Δ) - avatar
0
Thx. The answers helped me too!
4th May 2017, 8:19 PM
Lisa TĂŒrk
Lisa TĂŒrk - avatar