I am using a JDK 1.8 and I am facing a compilation problem something like below, when using multicatch.
Multiple markets in this line: Syntax error in token "|",. expected FileNotFoundException.IOException cannot be resolved to a type.
I checked a few related threads for multicatch but could not find the reason why I am facing this problem.
try
{
try
{
//LOGIC
}
finally
{
}
}catch ( FileNotFoundException | IOException e) {
//EXCEPTION HANDLING
}
PFA the screen grab to show the JDK version configured and the multi-catch throwing the exception.
@Tunaki - With individual catch statements it is working fine. I don't think it is because the finally block is before the catch block- PFB the screengrab: