Quiz 5

Quiz 5

University

8 Qs

quiz-placeholder

Similar activities

Information Coding Scheme

Information Coding Scheme

1st Grade - University

10 Qs

Associação com Matrizes - Parte 01

Associação com Matrizes - Parte 01

University

10 Qs

TAC3121-Quiz 6

TAC3121-Quiz 6

University

10 Qs

Chapter 9

Chapter 9

University

9 Qs

Final Keamanan Komputer / Sistem Keamanan Jaringan

Final Keamanan Komputer / Sistem Keamanan Jaringan

University

11 Qs

Tut11 - Exceptions

Tut11 - Exceptions

University

8 Qs

Cryptocurrency

Cryptocurrency

University

9 Qs

DEBUG THE CODE

DEBUG THE CODE

University

10 Qs

Quiz 5

Quiz 5

Assessment

Quiz

Computers

University

Medium

Created by

Farah Habib

Used 5+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Exceptions allow code to indicate an error occurred without specifying the details of handling that error. This is ____.

Abstraction

Inheritance

Encapsulation

Polymorphism

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The keyword used to produce a new Exception is ____.

handle

launch

start

throw

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following exception does not need to be caught:

ClassNotFoundException

FileNotFoundException

IOException

NullPointerException

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Within Java, files are represented as ____.

streams

exceptions

fountains

writer

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Implementing the ____ interface allows objects of a class to be written/read directly to/from files.

Writable

Comparable

Implementable

Serializable

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following classes writes binary data to a file?

DataInputStream

DataOutputStream

Filewriter

PrintWriter

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assuming a class is properly implemented, if x.hashCode() == y.hashCode(), then ____.

x.equals(y) == true

x.equals(y) == false

It is uncertain

NullPointerException

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If x.compareTo(y) returns a negative number, then ____.

x.hashCode() < y.hashCode()

x.hashCode() > y.hashCode()

x.hashCode() == y.hashCode()

There is no correlation between compareTo() and hashCode()