Given below the sample code :
try {
// code
} catch (NullPointerException npe) {
System.out.print("hello");
} catch (RuntimeException rte) {
System.out.print("brothers");
} finally {
System.out.print("sisters");
}
What will be the output of the above code ?
1. Compilation error
2. hello brothers
3 hello brothers and sisters
4.hello sisters.
(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.