+ 2
Does 'Exception e' declare an object 'e' of type Exception as a parameter, or is it syntax simply meaning 'all exceptions'?
7 Answers
+ 1
'e' is an object of class Exception. name of object can be anything as per your choice.
0
It defines an object that will hold the exception information, once occurred.
0
its not just syntax. but its not meaning 'all expections' always. you can use something like this for a method:
obj.methodname(Parameter par = new Parameter);
and 'try' is like that.
0
also we use something like that for loop(not exactly):
for(new i; i<5; i++){}
here we use 'i' wich means integer(but the name and 'being a single character' is optional). there we use 'e' for exception
0
yeah it is an object which will hold information of exception when occurred
0
e symbol is the object of exception it is look forwards to all exceptions.......
0
Yep. (declares a refrence data type of Exception class)
Exception class is a super class.
All the exceptions are the sub classes and inherit features from the Exception class.