I have added a program below that throws an exception. Review the program, identify the exception, and share your comments or observations below. Click the “Click for Solution” button to view the explanation of the output.
package tests;
import org.testng.annotations.Test;
public class ExceptionClass {
@Test
public void testMySkills() {
try {
int num=10;
int dividend=num/0;
System.out.println("Dividend is"+dividend);
} catch (Exception ex) {
System.out.println("Exception occurred:"+ex);
}
}
}