Search Header Logo

Java Exception Handling

Authored by Sam Raj

Computers

University

15 Questions

Used 59+ times

Java Exception Handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the advantage of Exception Handling

To avoid abnormal termination of a program

To find out errors

To Debug program

None of these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the parent class of All Exceptions in JAVA

Throw

Exception

Error

Bug

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following key word is optional in Exception handling program

try

catch

finally

throw

4.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What is the purpose of 'throw' keyword

To Raise an exception explicityly

To Raise an exception implicityly

To create user defined exceptions

To create custom exceptions

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Exception classes belongs to following package

import java.io.*

import java.lang.*

import java.util.*

import java.lang.Exception.*

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to create our own exception

using 'throw' keyword

using 'throws' keyword

using 'finally' keyword

using 'throwable' keyword

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Choose an exception if attempt to divide number by zero


int number = 89 / 0;

System.out.println("The answer is " + number);

ArithmeticException

NullPointerException

NumberFormatException

ArrayIndexOutOfBoundException

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?