try-catch Exception | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

try-catch Exception

try{ some codeā€¦ } catch(Exception e) { ā€¦ā€¦. } What does the alphabet "e" after the exception in the bracket mean?

21st Jun 2019, 8:35 AM
Preet
3 Respostas
+ 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.
21st Jun 2019, 8:45 AM
Rincewind
Rincewind - avatar
+ 3
e is just a variable name. Exception e String str char c Object o ...
21st Jun 2019, 9:47 AM
Denise RoƟberg
Denise RoƟberg - avatar
+ 1
parameter name
21st Jun 2019, 9:52 AM
zemiak