Java Basic Data Structures

Quiz
•
Computers
•
6th - 10th Grade
•
Hard
Xander Ge
Used 182+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What are for loops used for?
To run a piece of code only when a certain condition is met
To run a piece of code repeatedly until a condition is met
To run a piece of code repeatedly forever
To run a piece of code if a condition isn't met
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How do you write a for loop?
for (int i = 0; i < 21) {}
for (int i = 0; i++) {}
for (int i = 0; i < 21; i++) {}
for (i) {}
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is the right way to create an ArrayList of Integers?
ArrayList<Integer> list = new ArrayList<Integer>;
ArrayList Integer = new ArrayList();
Integer ArrayList = new Integer ArrayList();
ArrayList<Integer> list = new ArrayList<Integer>();
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
How do you add 21 to an ArrayList of Integers?
list.add(21);
list.put(21);
21.add(list);
list.add("21");
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is the right way to put 21 at the second position in an ArrayList of Integers?
(Remember zero-indexing!)
list.put(2, 21);
list.add(1, 21);
list.add(2, 21);
list.add(21, 1);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you get the third element of an ArrayList?
(Remember zero-indexing!)
list.find(2);
list.get(3);
list.find(3);
list.get(2);
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does this code print out?
Nothing
0
1
2
3
3
2
1
0
2
1
0
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Programming

Quiz
•
9th - 11th Grade
11 questions
Chapter Dictionaire

Quiz
•
9th Grade
10 questions
Core Java Collections Quiz

Quiz
•
10th Grade
15 questions
Computer Science Quiz: Application of Computational Thinking

Quiz
•
10th Grade
12 questions
Python - Data Types and Operators

Quiz
•
7th Grade
20 questions
Introduction to Python

Quiz
•
7th - 9th Grade
16 questions
Python Review

Quiz
•
9th - 12th Grade
20 questions
Exploring Python Basics Quiz

Quiz
•
7th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
typing

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade