Search Header Logo

Day 22 - C10p1

Authored by An Bình

Professional Development, Computers

Professional Development

Used 1+ times

Day 22 - C10p1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Which of the following statements are true? (Choose all that apply.)

Exceptions of type RuntimeException are checked.
You can declare unchecked exceptions
You can declare checked exceptions.
You can handle only Exception subclasses
All exceptions are subclasses of Throwable.

2.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What is printed by the following?

1234
134
13
Compile error
Runtime error

3.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image

Which exception will the following method throw?

ArrayIndexOutOfBoundsException
IllegalArgumentException
ClassCastException
NumberFormatException
NullPointerException

4.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

What will happen if you add the following statement to a working main() method? System.out.print(4 / 0);

Compile error
IllegalArgumentException
NumberFormatException
ArithmeticException
It will not run.

5.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What is printed by the following program?

AECD
AE followed by a stack trace
AEBCD followed by a stack trace
AEC followed by a stack trace
A stack trace with no other output

6.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What is the output of the following snippet, assuming a and b are both 0?

-1
0
done-1
done0
Compile error

7.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image

What is the output of the following program?

Starting up_
Starting up_Problem_
Starting up_Problem_Shutting down
Starting up_Shutting down
Compile error

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?