
AJP-E2
Authored by RAVIKANTH K
Computers
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create an ArrayList of Strings?
ArrayList<String> list = new ArrayList[];
ArrayList list = new List<String>();
ArrayList list = new ArrayList<String>();
ArrayList<String> list = new ArrayList<>();
2.
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
3.
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();
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which collection class provides a way to store elements in key-value pairs?
ArrayList
Maps
LinkedList
All
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Main {
public static void main(String args[]) {
int x = 2;
int y = 0;
for ( ; y < 10; y++) {
if (y % x == 0)
continue;
else if (y == 8)
break;
else
System.out.print(y + " ");
}
}
}
1 3 5 7
1 3 5 7 9
8
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of the following collection classes can be used to store unique objects?
HashSet
LinkedHashMap
ArrayList
ALL
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following methods is used to add an element to the end of an ArrayList?
addLast()
addEnd()
add()
append()
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
AWS ACF PT-BR Módulo 2 - Economia e Faturamento na Nuvem
Quiz
•
Professional Development
10 questions
GUESS THAT WORD IN CYBER!
Quiz
•
Professional Development
10 questions
c programming-Test 1
Quiz
•
Professional Development
10 questions
PHP QUIZ-2
Quiz
•
Professional Development
10 questions
ÔN CUỐI NĂM KHỐI 5
Quiz
•
Professional Development
10 questions
CodeMonkey Platform Management & Resources
Quiz
•
Professional Development
10 questions
Revisão LP 2023.1
Quiz
•
Professional Development
10 questions
Avaliação Pensamento Computacional - Prático
Quiz
•
1st Grade - Professio...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Computers
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
100 questions
Screening Test Customer Service
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
10 questions
Reading a ruler in Inches
Quiz
•
4th Grade - Professio...
16 questions
Parallel, Perpendicular, and Intersecting Lines
Quiz
•
KG - Professional Dev...
12 questions
Valentines Day Trivia
Quiz
•
Professional Development