
APCSA unit 6
Authored by Thomas Wright
Computers
11th Grade
Used 11+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following arrays has a length of 5?
double[] arr = new double[6];
double[] arr = {3, 12, 52, 23, 14, 0};
double[] arr = new double[]{3, 12, 52, 23, 14, 0};
all of these
none of these
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements correctly initializes an array of integers with a size of 4?
int[] arr = new int[4];
int[] arr = {1, 2, 3};
int[] arr = new int[]{1, 2, 3, 4, 5};
none of these
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which option represents a correctly initialized string array containing exactly 3 elements?
String[] arr = new String[2];
String[] arr = {"Hello", "World", "!"};
String[] arr = new String[]{"Java"};
all of these
none of these
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize a boolean array of size 5 with all elements set to true?
boolean[] arr = new boolean[5];
boolean[] arr = {true, true, true, true, true};
boolean[] arr = new boolean[]{true};
none of these
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code is designed to return true if a target value is present in an array of integers.
Which of the following statements is true?
The code will not work correctly because the loop will not access each of the numbers correctly.
The code will not work correctly because it may return true too soon.
The code will not work correctly because the method may return false too soon.
The code will work as intended.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code do when executed?
It will produce an error because the conditional statement is not set up correctly.
It will count the number of times the value in the highTemp array exceeds the target value.
It will produce an ArrayIndexOutOfBoundsException
It will count the number of times that the value in the array is greater than the previous value in the array.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is valid? Assume that variable arr is an array of n integers and that the following is true:
arr[0] != arr[i] for all values of i from 1 through n - 1
The element arr[0] does not occur anywhere else in the array
arr has no duplicates
arr has duplicates
arr is sorted
arr is not sorted
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
22 questions
Number Systems & Binary Maths
Quiz
•
10th - 12th Grade
29 questions
Computer Parts
Quiz
•
9th - 12th Grade
25 questions
Python
Quiz
•
9th - 12th Grade
21 questions
Quiz 1
Quiz
•
9th - 12th Grade
24 questions
Computer Architecture A Level CS
Quiz
•
10th - 11th Grade
25 questions
Latihan Soal Pemrograman
Quiz
•
11th Grade
23 questions
History of the Computer
Quiz
•
11th Grade
26 questions
Macromedia Flash
Quiz
•
8th Grade - Professio...
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
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
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
10 questions
Dr. King's Speech and Its Impact
Interactive video
•
7th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Los mandatos y las recetas
Lesson
•
11th Grade
7 questions
Anti-Bullying ARS 15-341
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
15 questions
TSI Math Practice Questions
Quiz
•
8th - 12th Grade