
Java Arrays Worksheet
Authored by Irish Dajero
Information Technology (IT)
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
51 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer wants to store the ages of 50 students using a single variable name. What should they use?
Class
Array
Loop
Method
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best defines an array in Java?
A list of random variables
A collection of variables of different types
A fixed-size sequential collection of elements of the same type
A method to sort data automatically
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Java, what is the index of the first element in an array?
-1
0
1
Depends on declaration
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key advantage of arrays?
They can grow automatically
They provide random access to elements
They are faster than loops
They can hold different data types
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A developer wants to store the names of 7 days. What array declaration is correct?
String days = {"Mon","Tue","Wed"};
string[] days = {"Mon","Tue","Wed","Thu","Fri","Sat","Sun"};
days = new String("Mon");
string days[7] = new String();
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which correctly declares and allocates an array of 10 integers?
int a = new int(10);
int[] a = new int[10];
int a[10];
new int a[10];
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the code below? int[] nums = {1,2,3,4,5}; System.out.println(nums[2]);
1
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
50 questions
Mengenal Algoritma Pemrograman Scratch
Quiz
•
10th Grade - University
50 questions
Java қазақша 51 - 100
Quiz
•
University
52 questions
MS Word Shortcuts Quiz
Quiz
•
University
50 questions
flop qua thi ghi ten anh vao
Quiz
•
University
50 questions
KM02
Quiz
•
University
50 questions
CHƯƠNG 5 PHẦN 3
Quiz
•
University
50 questions
KELAS XI BAB 1 INFORMATIKA DAN PEMBELAJARANYA
Quiz
•
11th Grade - University
50 questions
Uji Pemahaman Algoritma Pemrograman
Quiz
•
10th Grade - University
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
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University