
APCSA Unit 6 Review Arrays

Quiz
•
Computers
•
10th - 12th Grade
•
Easy
Lindsay Schwisow
Used 388+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is FALSE about arrays on Java
A java array is an object
Length of array can be changed after creation of array
Numerical data types of arrays are initialized to 0 to start
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int arr[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage Value
Garbage Value
0
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int [ ] arr = new int[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage Value
Garbage Value
0
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the length of the following array: int [] data = { 12, 34, 9, 0, -62, 88 };
1
5
6
12
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output of following Java program?
class Test{
public static void main (String[] args) {
int [] arr1 = {1, 2, 3};
int [] arr2 = {1, 2, 3};
if (arr1 == arr2)
System.out.println("Same");
else
System.out.println("Not same");
}}
Same
Not same
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the indexes for the array ar, given the following declaration:
int[] ar = {2, 4, 6, 8 }
0, 1, 2, 3
1, 2, 3, 4
0, 2, 4, 6
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
19 questions
Unit 5 - Two-Dimensional Arrays

Quiz
•
9th - 12th Grade
18 questions
Java Wiederholung

Quiz
•
12th Grade
15 questions
Java Level 1 - C

Quiz
•
12th Grade
16 questions
Java Основи

Quiz
•
11th Grade - University
14 questions
Exploring Computer Science

Quiz
•
10th - 12th Grade
10 questions
Arrays

Quiz
•
10th - 12th Grade
14 questions
AP CSA Review

Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade