After Group Activity

After Group Activity

Professional Development

5 Qs

quiz-placeholder

Similar activities

General C#

General C#

Professional Development

10 Qs

PREP NPI Edition - Accessories

PREP NPI Edition - Accessories

Professional Development

8 Qs

Python Basics

Python Basics

Professional Development

10 Qs

Introduction to AI and Azure Custom Vision

Introduction to AI and Azure Custom Vision

Professional Development

10 Qs

Apple Hardware Quiz 1

Apple Hardware Quiz 1

Professional Development

10 Qs

PHP QUIZ-2

PHP QUIZ-2

Professional Development

10 Qs

Mobile Offline Sync - OutSystems

Mobile Offline Sync - OutSystems

Professional Development

10 Qs

Google Calendar - Exit Quiz

Google Calendar - Exit Quiz

Professional Development

10 Qs

After Group Activity

After Group Activity

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Ms STAFF

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...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java code?

class Output {

public static void main(String args[]) {

try {

int a = 0;

int b = 5;

int c = a / b;

System.out.print("Hello");

} finally {

System.out.print("World");

}

}

}

Hello

World

HelloWorld

Compilation Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following exceptions is not a subclass of the RuntimeException class?

NullPointerException

ArrayIndexOutOfBoundsException

IOException

ArithmeticException

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program?

public class Question {

public static void main(String[] args) {

try {

int a = 5 / 0;

}

catch (Exception e) {

catch (ArithmeticException a) {

System.out.println("Cannot divide by 0");

}

}

System.out.println("Hello World");

}

}

“Hello World”

“Cannot divide by 0”

Compilation Error

Runtime Error (the code compiles successfully)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which exception is thrown when an array element is accessed beyond the array size?

ArrayElementOutOfBounds

ArrayIndexOutOfBoundsException

ArrayIndexOutOfBounds

None of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program?

public class Question {

public static void main(String[] args) {

try {

int a = 5 / 0;

}

catch (Exception e) {

System.out.println("unknown exception");

}

catch (ArithmeticException a) {

System.out.println("Cannot divide by 0");

}

System.out.println("Hello World");

}

}

“Hello World”

“Cannot divide by 0”

Compilation Error

RuntimeError (the code compiles successfully)

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?