
Java Arrays Worksheet
Quiz
•
Information Technology (IT)
•
University
•
Hard
Irish Dajero
Used 2+ times
FREE Resource
Enhance your content in a minute
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
56 questions
Модульна контрольна робота з нереляційних баз даних
Quiz
•
University
56 questions
ICTU LẬP TRÌNH HĐT - BÀI 3
Quiz
•
University
51 questions
Бағдарламалау негіздері бойынша тест
Quiz
•
University
48 questions
Câu hỏi về HTML và JS
Quiz
•
University
50 questions
ບົດເສັງທ້າຍພາກວິຊາ MP
Quiz
•
University
53 questions
Networking Quiz
Quiz
•
University
55 questions
Menguasai ATMega328P
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Information Technology (IT)
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
25 questions
Waves-8th Grade Physical Science
Quiz
•
KG - University
41 questions
Unit 8 Key Terms
Quiz
•
11th Grade - University
10 questions
Product & Quotient Derivative Rules
Quiz
•
University
5 questions
How to Calculate Force - Newton's 2nd Law of Motion
Interactive video
•
10th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
