What is the default value of an array element of type int in Java?

Java Array

Quiz
•
Information Technology (IT)
•
University
•
Medium
Adlina Anwar
Used 22+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
0
null
undefined
0.0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you find the length of an array in Java?
arr.length()
arr.length
arr.size()
arr.capacity()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the wrong way to creates an array of strings?
A) String[] arr = new String[5];
B) String arr = new String[5];
C) String[] arr; arr = new String[5];
D) both A and C
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
1
4
3
5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you initialize an array with the values 1, 2, 3, 4, and 5?
int[] arr = {1, 2, 3, 4, 5};
int[] arr = new int[5]
int arr[] = {1, 2, 3, 4, 5};
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in an array?
-1
1
0
2
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
1
2
3
4
5
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Refresh Python

Quiz
•
University
15 questions
Test wiedzy: Tablice jednowymiarowe w C++

Quiz
•
10th Grade - University
11 questions
CodeQuest TechTopia 2025-26

Quiz
•
University
6 questions
Kuis Pointer 1

Quiz
•
University
10 questions
Quiz Meet 1 Mini SC Programing

Quiz
•
University
10 questions
Quiz on Basics of C

Quiz
•
University
8 questions
Intro to JS: Variables & Values

Quiz
•
11th Grade - University
15 questions
Understanding Loops in C Programming

Quiz
•
1st Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade