Day 23 - c10p2

Day 23 - c10p2

Professional Development

7 Qs

quiz-placeholder

Similar activities

Exception Handling-1

Exception Handling-1

Professional Development

10 Qs

Semana2 - C#

Semana2 - C#

Professional Development

5 Qs

Synonym 2

Synonym 2

Professional Development

10 Qs

P&P CSAT

P&P CSAT

Professional Development

8 Qs

PARTS OF SPEECH

PARTS OF SPEECH

Professional Development

10 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 Qs

JAVA - EXCEPTION HANDLING

JAVA - EXCEPTION HANDLING

Professional Development

5 Qs

Lateral thinking

Lateral thinking

Professional Development

10 Qs

Day 23 - c10p2

Day 23 - c10p2

Assessment

Quiz

Computers, Professional Development

Professional Development

Hard

Created by

An Bình

Used 1+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

Media Image
Which of the following pairs fill in the blanks to make this code compile?
throw, throw new , throws
throws, throw, throw new
throws, throw new, throw
throws, throw, throw
throw, throws new, throws

2.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Which of the following statements about finally blocks are true? (Choose all that apply.)
A finally block is required when there are no catch blocks in a regular try statement.
A finally block is required when the program code doesn’t terminate on its own.
A finally block is never required with a try-with-resources statement.
A finally block is required in order to make sure all resources are closed in a try-with-resources statement.
A finally block is executed before the resources declared in a try-with-resources statement are closed.

3.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image
How many lines occur compile error in this code snippet ?
1
2
3
It compiles and print XAO
It compiles and print XOA

4.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Media Image
Which of the following can be inserted on line 8 to make this code compile? (Choose all that apply.)
System.out.println("it's ok");
throw new Exception();
throw new IllegalArgumentException();
throw new java.io.IOException();
throw new RuntimeException();

5.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Media Image
What is printed by the following program?
QSM
QMS
SQM
A stack trace
Compile error

6.

MULTIPLE SELECT QUESTION

1 min • 5 pts

Which of the following do not need to be handled or declared? (Choose all that apply.)
ArrayIndexOutOfBoundsException
IllegalArgumentException
IOException
Error
NumberFormatException

7.

MULTIPLE SELECT QUESTION

2 mins • 5 pts

Media Image
Which lines can fill in the blank to make the following code compile? (Choose all that apply.)
Error a
ClassCastException b
NullPointerException c
RuntimeException d
NumberFormatException e