Search Header Logo

JAVA-Day4

Authored by Chitra Muthu

Information Technology (IT)

University

Used 1+ times

JAVA-Day4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which keyword is used to handle exceptions in Java?

try

throw

catch

All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of the finally block in exception handling?

It executes only when an exception occurs.

It executes only if no exception occurs.

It always executes, regardless of exceptions.

It throws exceptions to the calling method.

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which keyword is used to throw an exception explicitly in Java?

throw

throws

catch

try

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is an ordered collection of elements in Java?

HashSet

TreeSet

LinkedList

HashMap

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which collection does not allow duplicate elements?

List

ArrayList

HashSet

LinkedList

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which collection uses a tree structure to store elements in a sorted order?

TreeSet

HashSet

ArrayList

LinkedList

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which class implements the Map interface using a hash table?

TreeMap

HashMap

LinkedHashMap

SortedMap

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?