
JavaP2 Unit 2 Data Structures Quiz
Authored by Krista Dobbins
Computers
9th - 12th Grade
Used 17+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following arrays has a length of 5?
double[] arr = new double[6];
double[] arr = {0, 1, 2, 3, 4, 5};
double[] arr = new double[]{1, 2.3, 4, 5};
None of the above
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following are valid arrays?
I only
II only
III only
I and II
I and III
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program?
hel
hello
hellow
Error
None of the above
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
When run, which of the following yields the integer 5?
int[] newArray = {5, 5, 5, 5, 5, 5};
System.out.println(newArray.length);
String pets[] = new String[5];
System.out.println(pets.length());
int[] anotherArray = {5, 10, 15, 20, 25};
System.out.println(anotherArray[(anotherArray.length - 2)] - 15);
String[] favoriteNumbers = {"5", "7", "12", "13", "5"};
System.out.println(favoriteNumbers[favoriteNumbers[0]]);
int[] greatArray = {5, 4, 3, 2, 1, 0};
System.out.println(greatArray.get(0));
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What values will the array contain after the following the code is run?
{6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4}
{1, -3, 3, -1, 5, 1, 7, 3, 9, 5, 11}
{1, 3, 5, 7, 9, 7, 5, 3, 1, -1, -3}
{-4, 1, -2, 3, -4, 5, -6, 7, -8, 9}
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
You are working at the frozen yogurt shop in the mall. Your boss asks you to count how many flavors have the word chocolate in their name. You begin going through the list of flavors, but quickly realize that their are over 9000 flavors to check! Luckily, your boss stored all of the different flavors in a Java Array named flavorArray on the company computer. Write a Java program to count the number of flavors that have chocolate in their name.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What value will be held in mysteryNumber when this code finishes running?
0
17
1
16
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
20 questions
Latihan Jaringan Dasar PSAS
Quiz
•
10th Grade
22 questions
Text and Image representation
Quiz
•
11th Grade
17 questions
Warstwa transportowa
Quiz
•
12th Grade
20 questions
DISEÑO WEB BLOQUE II
Quiz
•
12th Grade
20 questions
TIN 12_BÀI 11
Quiz
•
12th Grade
21 questions
حاسب 1 نظري
Quiz
•
10th Grade
20 questions
Pemrograman Dasar
Quiz
•
10th Grade
18 questions
TEST Bài 1_K12_Sách KNTT
Quiz
•
12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade