Question: Please code in Java Requirements Write a Java process module (nameit Lab06.java) that meets the following requirements: The module will contain two methods (defined outside

Please code in Java

Please code in Java Requirements Write a Java process module (nameit Lab06.java)

Requirements Write a Java process module (nameit Lab06.java) that meets the following requirements: The module will contain two methods (defined outside of the main method): someMethod and someMethod2. 1. 2. The main method will call someMethod a. Method someMethod will call method someMethod2. i. Method someMethod2 will throw an Exception, passing the String "This Exception thrown in someMethod2." b. Method someMethod will catch the Exception thrown in someMethod2, and will chain the Exception, adding the String message "This Exception caught in someMethod2, chained, and thrown as a new Exception. 3. The main method will catch the Exception and perform the following tasks: Output the entire message text to the System.err stream. Output the stack trace to the System.err stream. a. b. Submission Requirements Submit only your java code. Submit only the .java file; do not submit a .class file Expected Output Line numbers for your output will likely be different from these. The ellipses at the end indicate that the stack trace continues for some lines after the portion shown. This Exception caught in someMethod2, chained, and thrown as a new Exception. java.lang. Exception: This Exception caught in someMethod2, chained, and thrown as a new Exception. at Lab06.someMethod (Lab06.java:35) at Lab06.main (Lab06.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source) at java.lang.reflect.Method.invoke (Unknown Source)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!