Unit 6 Test Review - Arrays

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

20 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which of the following is FALSE about arrays on Java: A java array is always an object; Arrays in Java are always initialized to have values of 0; Length of array can be changed after creation of array
Back
Length of array can be changed after creation of array
2.
FLASHCARD QUESTION
Front
Find the output
class Test {
public static void main(String args[]) {
int arr[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Back
Compile error
3.
FLASHCARD QUESTION
Front
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]);
}
}
Back
0
0
4.
FLASHCARD QUESTION
Front
What is the length of the following array: int [] data = { 12, 34, 9, 0, -62, 88 };
Back
6
5.
FLASHCARD QUESTION
Front
What will happen when executing the following code?
class Demo1 { public static void main(String args[]) { int [] i = new int[10]; System.out.println(i[10]); } }
Back
Out-of-bounds exception
6.
FLASHCARD QUESTION
Front
_________________ is a collection of elements used to store the same type of data.
Back
Array
7.
FLASHCARD QUESTION
Front
What are the legal indexes for the array ar
, given the following declaration:
int[] ar = {2, 4, 6, 8 }?
Back
0, 1, 2, 3
Create a free account and access millions of resources
Similar Resources on Wayground
14 questions
Javascript Control Structures Practice

Flashcard
•
9th - 12th Grade
16 questions
Loops Flashcard

Flashcard
•
9th - 12th Grade
15 questions
Arrays C++- CS 172 Exercise #1

Flashcard
•
8th - 12th Grade
10 questions
Arrays

Flashcard
•
10th - 12th Grade
13 questions
java variables 1

Flashcard
•
9th - 12th Grade
13 questions
Functions and Parameters

Flashcard
•
9th - 12th Grade
20 questions
Arrays in Java

Flashcard
•
9th - 12th Grade
19 questions
Java 2D Arrays_Review

Flashcard
•
11th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade