+ 1

why catch used in file handling

1st Sep 2016, 10:03 AM
ananth
ananth - avatar
4 Answers
+ 2
try☆ //some code } catch (IOException e) { System.out.println (e); }
2nd Sep 2016, 2:39 AM
Shubham Priyesh
Shubham Priyesh - avatar
+ 1
catch is always ysed with try block for catching the compile time error and for print it unless crashing the program at runtime !!
2nd Sep 2016, 2:37 AM
Shubham Priyesh
Shubham Priyesh - avatar
+ 1
try {
2nd Sep 2016, 2:40 AM
Shubham Priyesh
Shubham Priyesh - avatar
0
it is used to check for the type of exception that has occurred while handling the file.
1st Sep 2016, 10:39 AM
Mahalakshmi Teki