
Java Quiz 2

Quiz
•
Computers
•
University
•
Hard
Omphile Mosingathi
Used 3+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What package does ArrayList belong to?
A. java.io
B. java.util
C. java.lang
D. java.net
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary advantage of using an ArrayList over an array?
A. Fixed size
B. Dynamic size
C. Faster access
D. Less memory usage
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add an element to an ArrayList?
A. insert()
B. append()
C. add()
D. put()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ArrayLists cannot store primitive types directly. What should be used instead?
A. Primitive Wrappers
B. Collections
C. Arrays
D. Interfaces
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to create an ArrayList of integers?
A. ArrayList<int> list = new ArrayList<>();
B. ArrayList<Integer> list = new ArrayList<>();
C. ArrayList<Int> list = new ArrayList<>();
D. ArrayList<int[]> list = new ArrayList<>();
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you sort an ArrayList in Java?
A. Collections.sort()
B. Arrays.sort()
C. List.sort()
D. ArrayList.sort()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to remove an element from an ArrayList?
A. delete()
B. remove()
C. erase()
D. cut()
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
Easy LEVEL

Quiz
•
9th Grade - University
36 questions
Struktur Data dalam Pembuatan Gim

Quiz
•
12th Grade - University
40 questions
TypeScript_Ver3

Quiz
•
University
45 questions
TECHNICAL QUIZ

Quiz
•
University
35 questions
end of year Quiz

Quiz
•
12th Grade - University
37 questions
Разработка мобильных приложений

Quiz
•
University
40 questions
Java Programming

Quiz
•
University
44 questions
Data Structures Quiz

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade