Consider the following program:
import java.io.*; import java.sql.*; public class Main { public static void fooThrower() throws FileNotFoundException { throw new FileNotFoundException(); }//from w w w . j a va 2 s .c o 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).