Consider the following try .... catch block:
Short Answer
Views 15
Answer:
class TryCatch { public static void main(String args[]) { try { double x = 0.0; throw new Exception("Thrown"); } catch (Exception e) { System.out.print("Exception caught"); return; } finally { System.out.println("finally"); } } }
Output:
Exception caughtfinally
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.