What will be the output? public class Test {    static void…

What will be the output? public class Test {    static void test() {        try {            throw new RuntimeException(“try”);        } finally {            throw new RuntimeException(“finally”);        }    }     public static void main(String[] args) {        try {            test();        } catch (Exception e) {            System.out.println(e.getMessage());        }    }}

True of False: Through Polymorphism, a Class that implements…

True of False: Through Polymorphism, a Class that implements an Interface also acquires the Data Type of that Interface (e.g., if I have an Interface named “Herbivore” and created a Class with the class declaration as “public class Elephant implements Herbivore”, then through Polymorphism an Elephant is both an Elephant and an Herbivore and is no longer just an Elephant).

The following code may produce an Arithmetic Excpetion if c…

The following code may produce an Arithmetic Excpetion if c = 0:   public int divide(int b, int c){     int a = b / c;     return a;}   Select ALL code below that can solve this divide by zero problem (note, in the case of a divide by 0, the code may either return 0 or pass on the exception).

Consider the Interface Bar and use it to answer the followin…

Consider the Interface Bar and use it to answer the following questions:   public interface Bar{     public abstract double fun1(double a);     public abstract double fun2(double a, double b);}     True or False: If an Anonymous Class were to be created from Bar, AT LEAST one of the abstract methods in Bar need to be defined for the the Anonymous Class to be valid (i.e., you may define both methods, but ONLY one method is REQUIRED to be defined).