Discussion :: Exceptions - Pointing out the correct statements (Q.No.4)
|Nagendra said: (Dec 20, 2011)|
|Yes, After try block the legal statement is catch or finally. !|
|Tiago said: (Jan 18, 2012)|
|The first catch block will also cause compiler error. Because it will never be executed.|
|Mayuri said: (Oct 1, 2012)|
|The first catch block causes compiler error as we are throwing FileNotFoundException it will not catch EOFException.|
|Kalman said: (Nov 17, 2015)|
|"Assuming this block of code is placed into a class".
Indeed it must be placed into a method to work.
|Groumpf said: (Dec 4, 2015)|
|I agree with Kalman.
"Assuming this block of code is placed into a class" is confusing.
I answered compilation error because this block cannot be put in a class.
|Prabhat Mishra said: (Dec 20, 2016)|
|Please give the detailed answer.|
|Tohid said: (Jan 16, 2017)|
|Can we use throw in try block?|
|Ranjeet said: (Jan 27, 2018)|
|I didn't get exact it. Please explain me.|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.