Given below the sample code :
public class section66 {
public static void main(String[] args) {
System.out.println("Inside try");
catch{
System.out.println("Inside catch");
}
finally {
System.out.println("Inside finally ");
}
System.out.println("at end of the code");
}}
Find the error in the above code ?
1. No errors. Prints : Inside try
Inside finally
at end of the code
2. Prints : "Inside try".
3. Prints : "Inside finally".
4. Compile error 'catch' without 'try'
(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.