Array is
Java Quiz

Quiz
•
Professional Development
•
Professional Development
•
Medium
342856_Amit Upadhyay_JH
Used 56+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
immutable
mutable
always contant
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following declares an array of int named img?
int img;
int[] img;
new int img[];
int img = int[];
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the legal indexes for the array ar, given the following declaration:
int[] ar = {2, 4, 6, 8 };
0, 1, 2, 3
1, 2, 3, 4
2, 4, 6, 8
0, 2, 4. 6
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment:
int[] ar = {2, 4, 6, 8 };
System.out.println( ar[0] + " " + ar[1] );
2 6
8
2 4
6 8
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment:
int[] ar = {2, 4, 6, 8 };
ar[0] = 23;
ar[3] = ar[1];
System.out.println( ar[0] + " " + ar[3] );
23 2
2 8
31
23 4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment:
int[] y = new int[5];
y[0] = 34;
y[1] = 88;
System.out.println( y[0] + " " + y[1] + " " + y[5] );
34 88 0
34 88 88
The program is defective and will not compile
0 34 88
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code fragment:
int[] z = new int[9];
z[0] = 7;
z[1] = 3;
z[2] = 4;
System.out.println( z[0] + z[1] + " " + z[5] );
10 0
7 3 0
The program is defective and will not compile.
7 3 4
Create a free account and access millions of resources
Similar Resources on Quizizz
36 questions
Metrologia

Quiz
•
Professional Development
40 questions
OS Quiz to Win

Quiz
•
Professional Development
40 questions
Quiz_31.03.2023

Quiz
•
Professional Development
40 questions
M2 R5 MCQ (Test 8)

Quiz
•
Professional Development
40 questions
Term1-Final-Quiz2024MATTAYOM1

Quiz
•
Professional Development
40 questions
Construction- Vocabulary

Quiz
•
Professional Development
40 questions
CompTIA Network+ N10-008 Exam IP Addressing

Quiz
•
Professional Development
44 questions
Machinist Grinder 3rd Sem Module 4 : Cylindrical grinding

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade