try-catch Exception | SoloLearn: Learn to code for FREE!

0

try-catch Exception

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

6/21/2019 8:35:29 AM

Preet

3 Answers

New Answer

+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