Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions