Day 23 - c10p2

Day 23 - c10p2

Professional Development

7 Qs

quiz-placeholder

Similar activities

C++Quiz#1

C++Quiz#1

Professional Development

10 Qs

Flutter Prague #5

Flutter Prague #5

Professional Development

6 Qs

Uso de try, except, finally y raise en Python

Uso de try, except, finally y raise en Python

Professional Development

12 Qs

Serialization

Serialization

Professional Development

10 Qs

ExcepcionsJAVA

ExcepcionsJAVA

Professional Development

10 Qs

Collections, JDBC/RDBMS

Collections, JDBC/RDBMS

Professional Development

10 Qs

Java main() and Scanner

Java main() and Scanner

Professional Development

10 Qs

Python

Python

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