Unit 6 - Arrays Review

Interactive Video
•
Computers
•
11th Grade
•
Medium
Myra Deister
Used 2+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about Java arrays is false?
Arrays can hold primitive data types and objects
The size of an array can be changed after initialization
Multi-dimensional arrays are arrays of arrays
Array elements are stored in contiguous memory locations
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid way to declare and initialize an array in Java?
nt[] numbers = new int[5];
int numbers[] = {1, 2, 3, 4, 5};
int[] numbers = new int[]{1, 2, 3, 4, 5};
int numbers[5] = {1, 2, 3, 4, 5};
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code snippet:
int[] arr = new int[5];
arr[5] = 10;
What will happen when this code is executed?
The value 10 will be stored at index 5
An ArrayIndexOutOfBoundsException will be thrown
The array will automatically resize to accommodate the new element
The value 10 will be stored at index 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the relationship between an array's reference variable and its object in memory?
They are stored in the same memory location
The reference variable stores the first element of the array
The reference variable points to the array object on the heap
The reference variable stores the length of the array
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int[] a = {1, 2, 3, 4, 5};
int[] b = a;
b[2] = 10;
System.out.println(a[2]);
3
10
5
An error occurs
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the example, is it possible to use an enhanced for loop instead of a for loop?
True
False
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
int[] arr = {1, 2, 3, 4, 5};
for(int i = 0; i < arr.length; i += 2) {
System.out.print(arr[i] + " ");
}
What will be the output?
1 2 3 4 5
1 3 5
2 4
1 3
Create a free account and access millions of resources
Similar Resources on Wayground
8 questions
Learn Java from Scratch - A Beginner's Guide - Step 03 - Java Arrays - Puzzles - Arrays of Objects, Primitive Data Types

Interactive video
•
University
8 questions
Java Programming for Complete Beginners - Java 16 - Step 03 - Java Arrays - Puzzles - Arrays of Objects, Primitive Data

Interactive video
•
University
11 questions
Java Programming Fundamentals

Interactive video
•
8th - 10th Grade
6 questions
Learn and Master C Programming - Working with 2D Arrays

Interactive video
•
University
11 questions
Understanding Array Manipulation and Functions

Interactive video
•
10th - 12th Grade
11 questions
Understanding Arrays

Interactive video
•
9th - 12th Grade
8 questions
Learn and Master C Programming - Introduction to Arrays

Interactive video
•
University
6 questions
JavaScript Mastery from Zero to Hero - Prepare for Coding Interviews - Formatting and toUpperCase with JavaScript

Interactive video
•
9th - 10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade