Can anyone explain about throw and throws keyword in java? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Can anyone explain about throw and throws keyword in java?

7th Dec 2020, 2:37 PM
Yash Chaudhari
Yash Chaudhari - avatar
2 Réponses
7th Dec 2020, 2:46 PM
Manash Saikia [ 45% Active ]
Manash Saikia [ 45% Active ] - avatar
+ 2
throw to throw error throws to indicate that method may throw an error..when you call it, you must use try catch block
7th Dec 2020, 2:50 PM
durian
durian - avatar