
JavaP2 Unit 2 Data Structures Quiz
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Krista Dobbins
Used 17+ times
FREE Resource
Enhance your content
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Format File Gambar
Quiz
•
12th Grade
20 questions
Nuevas tecnologías
Quiz
•
6th Grade - Professio...
20 questions
Computer Science - X
Quiz
•
8th - 10th Grade
20 questions
BÀI 24-25 TIN 10
Quiz
•
10th Grade
20 questions
TEST -EXCEL 1
Quiz
•
1st - 10th Grade
21 questions
Lecture Exercise Topic 1.3
Quiz
•
12th Grade
18 questions
QUIZ 1 ALGEBRA DE BOOLE
Quiz
•
10th Grade
20 questions
Unit Test 1 Class 8 Computer
Quiz
•
8th - 9th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd 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
30 questions
Computer Terminology Exercise #1 ( Fill Ins)
Quiz
•
9th Grade
15 questions
MLA Formatting
Quiz
•
9th Grade
20 questions
Typing Practice
Quiz
•
7th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro
Lesson
•
5th - 9th Grade
20 questions
Google Sheets Quiz
Quiz
•
9th Grade