is it possible to give continue statement on finally block
Printable View
is it possible to give continue statement on finally block
yes, but it makes hardly any sense... finally is always executed - even if an exception occures within the try block. if you are talking about your file reading problem - this is not a solution. try to understand examples from the net or send the exact error message you get and the file you are trying to read etc...
here is a piece of code which is similar to what you want - you should not do it like that... you can put the continue in a finally block if you want...
for (int i=0; i<100; i++) {
try {
if (i%10 == 0) {
throw new Exception("Dividing by ten exception!");
}
else
System.out.println("-> " + i);
}
catch(Exception exc) {
System.err.println(exc.getMessage());
continue;
}
}