What output is produced by the following program? public class Question30 { public static void main(String[] args) { Question30 object = new Question30(); try { System.out.println("Trying"); ...


What output is produced by the following program?


public class Question30


{



public static void main(String[] args)



{



Question30 object = new Question30();



try



{



System.out.println("Trying");



object.sampleMethod();



System.out.println("Trying after call.");



}



catch(Exception e)



{



System.out.println("Catching");



System.out.println(e.getMessage());



}



}



public void sampleMethod() throws Exception



{



System.out.println("Starting sampleMethod.");



throw new Exception("From sampleMethod with love.");



}


}

Nov 14, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here