Consider the following program:
import java.io.FileNotFoundException; import java.sql.SQLException; public class Main { public static void fooThrower() throws FileNotFoundException { throw new FileNotFoundException(); }/* w w w . j av a 2s .co m*/ public static void barThrower() throws SQLException { throw new SQLException(); } public static void main(String []args) { try { fooThrower(); barThrower(); } catch(FileNotFoundException || SQLException multie) { System.out.println(multie); } } }
Which one of the following options correctly describes the behavior of this program?
d.
For multi-catch blocks, the single pipe (|) symbol needs to be used and not double pipe (||), as provided in this program.
hence this program will fail with compiler error(s).