Java Exception Handling | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Java Exception Handling

What is the difference between ‘throw’ and ‘throws’ in Java Exception Handling?

3rd Oct 2018, 3:59 PM
Tariq Mahmood Rana
Tariq Mahmood Rana - avatar
1 Antwort
+ 3
Throws defines the kinds of exceptions that the function can throw in general. Throw is used to throw an actual exception as soon as it occurs.
3rd Oct 2018, 4:29 PM
Anna
Anna - avatar