0
try-catch Exception
try{ some code… } catch(Exception e) { ……. } What does the alphabet "e" after the exception in the bracket mean?
3 Réponses
+ 3
Its the same as other functions where, for example, you write int a to represent that the function takes an integer as the parameter but you don't know what it is yet so you represent it within the function with a. Here, you know the parameter type will be an Exception and you're representing it with an e.
+ 3
e is just a variable name.
Exception e
String str
char c
Object o
...
+ 1
parameter name