
AJP-E2

Quiz
•
Computers
•
Professional Development
•
Hard
RAVIKANTH K
Used 2+ times
FREE Resource
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()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
C PROGRAMMING BASICS-QUIZ-1

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
13 questions
Repaso

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
13 questions
Strings and Arrays

Quiz
•
Professional Development
10 questions
React-Routing

Quiz
•
Professional Development
15 questions
Introduction to PHP

Quiz
•
Professional Development
10 questions
Punto de partida

Quiz
•
Professional Development
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
14 questions
Disney Trivia

Quiz
•
Professional Development
14 questions
2019 Logos

Quiz
•
Professional Development
7 questions
How to Email your Teacher

Quiz
•
Professional Development
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Employability Skills

Quiz
•
Professional Development