
Java-Chapter 18 Exam
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Sundi Tiller
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following types of data can be stored in arrays?
Primitive data types
strings
References to any kind of object
All of these can be stored in arrays
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When the line of code below is run, what values will be stored in each of the array elements? int[] teamScores = new int[5];
0
null
false
Java doesn't define an initial value, so the contents are random
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which answer will correctly declare and initialize a 5-element array with specific numeric values?
int[] teamScores = new int(10,5,17,20,3);
int teamScores = (10,5,17,20,3);
int[] teamScores = {10,5,17,20,3};
int[] teamScores = new int[10,5,17,20,3];
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the minimum and maximum valid array index values for a 5-element array?
0 and 5
0 and 4
1 and 4
1 and 5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the code below, which statement will correctly set the very first array element equal to 10? int[] teamScores = new int[5];
teamScores(1) = 10;
teamScores[0] = 10;
teamScores[10] = 0;
teamScores = 10;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the Score class has been defined, how many unique Score objects are created by the following code?
Score[] teamScores = new Score[4];
teamScores[0] = new Score();
teamScores[1] = new Score();
teamScores[2] = teamScores[1];
1
3
2
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If the Score class has been defined, what phrases should replace the ??? marks to set up a standard for() loop to iterate over the entire array?
Score[] teamScores = new Score[4];
for (???)
{
teamScores[i] = new Score();
}
int i=1; i<teamScores.length- 1; i++
int i=0; i<=teamScores.length; i++
int i=1; i<=teamScores.length-1; i++
int i=0; i<teamScores.length; i++
Create a free account and access millions of resources
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
17 questions
Security and Ethics
Quiz
•
9th - 12th Grade
20 questions
Design your website
Quiz
•
7th - 12th Grade
16 questions
OCR Sys Arch J277
Quiz
•
10th - 12th Grade
15 questions
Internet Basics
Quiz
•
5th Grade - University
20 questions
Tin học 11 chương I
Quiz
•
1st - 12th Grade
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms
Quiz
•
12th Grade - University
15 questions
Problem Solving : Design Solution
Quiz
•
12th Grade
15 questions
Virtual Private Server
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Computers
15 questions
Internet Vocabulary Notebook Check #2 - CTEA(2024)
Quiz
•
12th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
50 questions
Money Matters Fall 2025 Final Exam — Worksheet Questions
Quiz
•
12th Grade
47 questions
CSF Final Exam Practice
Quiz
•
9th - 12th Grade
