+ 2

Does 'Exception e' declare an object 'e' of type Exception as a parameter, or is it syntax simply meaning 'all exceptions'?

12th Jan 2016, 10:43 PM
Alex Greidinger
7 odpowiedzi
+ 1
'e' is an object of class Exception. name of object can be anything as per your choice.
11th Jul 2016, 12:58 PM
Neha Jella
0
It defines an object that will hold the exception information, once occurred.
19th May 2016, 11:31 AM
James Flanders
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.
25th Jun 2016, 10:30 AM
DanI MicraS
DanI MicraS - avatar
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
25th Jun 2016, 10:34 AM
DanI MicraS
DanI MicraS - avatar
0
yeah it is an object which will hold information of exception when occurred
25th Jun 2016, 10:41 AM
Mehaboobmunna Annigeri
Mehaboobmunna Annigeri - avatar
0
e symbol is the object of exception it is look forwards to all exceptions.......
11th Jul 2016, 9:40 AM
vijay negi
vijay negi - avatar
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.
17th Jul 2016, 1:56 PM
Vibhu Agarwal
Vibhu Agarwal - avatar