Course Solutions Uncategorized (Solved) : Java Netbeans Project Please Show Solution Public Class Testclass Public Static Void Main Q34204248 . . . .

(Solved) : Java Netbeans Project Please Show Solution Public Class Testclass Public Static Void Main Q34204248 . . . .

 

Java NetBeans project ***please showsolution****

public class TestClass {

    public static voidmain(String[] args) throws A {

        try {

           f();

        } finally {

           System.out.println(“Done.”);

        } catch (Exception1 e){

           throw e;

        }

    }

}

public class Exception1 extendsThrowable{}

Test Stem / Question

Choices

What is the problem with the above code?

A: The finally statement must be preceeded by the catchclause

B: Exceptions cannot be extended

C: It is illegal to throw an exception

D: Nothing is wrong

What should be done with the code?

A: Move the catch clause before the finally clause.

B: Do not use Throwable as the supertype of

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post