Search Header Logo

MODULE III

Authored by Vallipriyadharshini K

others

MODULE III
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

A method that potentially generates a checked exception must include this keyword in its method signature:

throw
extend
throws
extends

2.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Which of the following statements is true about Java's finally block?

The finally block is only executed if an exception is thrown in the try block
The finally block is only executed if an exception is thrown in the catch block
The finally block is only executed if an exception is not thrown in the try or catch block
The finally block is executed regardless of whether an exception is thrown in the try or catch block

3.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Media Image

What will be the output of the following Java code?

Hello
World
HelloWOrld
Compilation Error

4.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Which exception will be thrown by parseInt() method in Java?

. IntegerOutOfBoundException
IntegerFormatException
ArithmeticException
NumberFormatException

5.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Media Image

What will be the output of the following program?

Hello
World
HelloWOrld
WorldWorld

6.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

If an error occurs when code inside a try block runs, what will happen next?

Nothing will ever happen. The program will always crash.
The next line of code in the try block runs.
The code starts running again from the beginning of the try block.
The code in the catch block runs.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?