Java-QUIZ-PSGRK

Java-QUIZ-PSGRK

University

15 Qs

quiz-placeholder

Similar activities

DWDM-2

DWDM-2

University

20 Qs

Tree and Planar Graph

Tree and Planar Graph

University

10 Qs

CodeMonkey for B.Ed IT

CodeMonkey for B.Ed IT

University

10 Qs

Relational Algebra and Calculus

Relational Algebra and Calculus

University

20 Qs

Understanding Email, Contacts and Calendaring

Understanding Email, Contacts and Calendaring

University

10 Qs

ICT 0513 - Chapter 4 : System Unit

ICT 0513 - Chapter 4 : System Unit

University

15 Qs

Pra UPS 2

Pra UPS 2

University

20 Qs

BB

BB

University

10 Qs

Java-QUIZ-PSGRK

Java-QUIZ-PSGRK

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

saranya pravin

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 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

45 sec • 1 pt

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

try

catch

finally

throw

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the purpose of 'throw' keyword?

To Raise an exception explicitly

To Raise an exception implicitly

To create user defined exceptions

To create custom exceptions

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following statements should be used to import Exception Class?

import java.io.*

import java.lang.*

import java.util.*

import java.lang.Exception.*

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Choose an exception if there's an attempt to divide number by zero...


int number = 89 / 0;

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

ArithmeticException

NullPointerException

NumberFormatException

ArrayIndexOutOfBoundException

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

WHAT IS THE OUTPUT?

public class Foo

{

public static void main(String[] args)

{

try

{

return;

}

finally

{

System.out.println( "Finally" );

}

}

}

Finally

Compilation fails.

The code runs with no output

An exception is thrown at runtime.

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which will contain the body of the thread in Java?

Start()

Run()

Main()

Execute()

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?