Given below the sample code :
1 try {
2 // code
3 } catch (NullPointerException ne) {
4 System.out.print("NullPointerException ");
5 } catch (RuntimeException re) {
6 System.out.print("RuntimeException ");
7 } finally {
8 System.out.print("END");
9 }
If NullPointerException is trown at line number 2, What will be the output of the above code?
1.Compilation error
2.NullPointerException .
3.NullPointerException RuntimeException END
4..NullPointerException END
(4)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.