Question: 1 - When finally block gets executed ? Select One a . Always when try block get executed, no matter exception occured or not.b .

1- When finally block gets executed ?Select One a. Always when try block get executed, no matter exception occured or not.b. Always when a method get executed, no matter exception occured or not.c. Always when a try block get executed, if exception do not occur.d. Only when exception occurs in try block code.2- Interfaces are useful for ?Select One a. used to create objects of the classb. Visible to the packagec. Declaring methods that one or more classes are expected to implement.d. used when a member variable of a class has to be shared between all the instances of the class.3- What is the output of this program?class output {public static void main(String args[]){ String c = "Hello i love java"; boolean var; var = c.startsWith("hello"); System.out.println(var); }}Select One a. trueb. falsec. 0d.14- What is the output of this program?class exception_handling {public static void main(String args[]){ try { int a, b; b =0; a =5/ b; System.out.print("A"); } catch(ArithmeticException e){ System.out.print("B"); } finally { System.out.print("C"); }}Select One a. Ab. Bc. ACd. BC

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!