Java-Collections

Java-Collections

University

20 Qs

quiz-placeholder

Similar activities

Python-Lists_Dictionaries

Python-Lists_Dictionaries

University

20 Qs

UNIT-IV 2

UNIT-IV 2

University

15 Qs

Java Collection Set

Java Collection Set

University

20 Qs

SEGURIDAD DE LA INFORMACION - UTEPSA

SEGURIDAD DE LA INFORMACION - UTEPSA

University

20 Qs

Uji Pemahaman Berfikir Komputasional

Uji Pemahaman Berfikir Komputasional

9th Grade - University

20 Qs

IAS QUIZ 11

IAS QUIZ 11

University

25 Qs

JS/DOM/JQuery/HTML/CSS

JS/DOM/JQuery/HTML/CSS

University

18 Qs

Midterm Exam Content ITEC 204

Midterm Exam Content ITEC 204

University

20 Qs

Java-Collections

Java-Collections

Assessment

Quiz

Computers

University

Hard

Created by

Subba Chavva

Used 3+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a part of the Java Collections Framework?

ArrayList

Array

int[]

String

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which collection does not allow duplicate elements?

List

Set

Map

All of the above

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which collection class is synchronized?

HashSet

TreeSet

Hashtable

HashMap

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these is not a method in the Collection interface?

add()

get()

remove()

size()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

ArrayList<String> list = new ArrayList<>();

list.add("Java");

list.add("Python");

System.out.println(list.remove(0));

Java

Python

true

Compilation error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is incorrect statement about the Hastable class?

Hashtable class implements Map interface.

Hashtable class extends the Dictionary class.

Hashtable class implements Cloneable interface.

Hashtable class extends Properties class.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one is the correct way to iterate over elements in an ArrayList?

for (int i = 0; i < list.size(); i++)

for (int i : list)

for (Object obj : list)

for (Iterator it = list.iterator(); it.hasNext();)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?