APCS A - Array 6.1,6.2,6.3,6.
Flashcard
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Wayground Content
Used 1+ times
FREE Resource
Student preview

30 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the correct way to declare an array in Java? Options: int arr[] = new int[5];, int arr() = new int[5];, int arr = new int[5];, array int arr = new int[5];, int[5] arr;
Back
int arr[] = new int[5];
2.
FLASHCARD QUESTION
Front
What is the default value of an int array element in Java?
Back
0
3.
FLASHCARD QUESTION
Front
How do you get the length of an array arr in Java?
Back
arr.length
4.
FLASHCARD QUESTION
Front
What will arr[arr.length - 1] return?
Back
The last element
5.
FLASHCARD QUESTION
Front
Which exception is thrown for accessing an array index out of bounds? Options: IndexOutOfRangeException, OutOfMemoryError, NullPointerException, ArrayIndexOutOfBoundsException, IllegalArgumentException
Back
ArrayIndexOutOfBoundsException
6.
FLASHCARD QUESTION
Front
What is the index of the first element in an array?
Back
0
7.
FLASHCARD QUESTION
Front
Which of the following creates a 2D array? int arr[][] = new int[2][3];, int arr[] = new int[2,3];, int arr[2][3];, int arr = int[2][3];, int[][] arr = {2,3};
Back
int arr[][] = new int[2][3];
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
23 questions
Capitalization Flashcard
Flashcard
•
KG - 12th Grade
25 questions
Subject-Verb Agreement Level 1
Flashcard
•
KG - 12th Grade
20 questions
Stem-Changing Verbs
Flashcard
•
9th - 12th Grade
20 questions
Ecology Review
Flashcard
•
9th - 12th Grade
20 questions
Parts of Speech
Flashcard
•
9th - 12th Grade
20 questions
Brands
Flashcard
•
9th - 12th Grade
20 questions
Nocti pt 1
Flashcard
•
10th - 12th Grade
22 questions
Cyber Security Flashcard
Flashcard
•
10th Grade
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade