Arrays in Java

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Jharna Marwah[UHD]
Used 237+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int arr[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage value
Garbage value
0
0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
class Test {
public static void main(String args[]) {
int arr [ ] = new int[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
Compile error
Exception
Garbage value
Garbage value
0
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Demo1
{
public static void main(String args[])
{
int i[] = new int[0];
System.out.println(i[0]);
}
}
0
Exception
Garbage value
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class Demo1
{
public static void main(String args[])
{
int i[] = new int[10];
System.out.println(i[10]);
}
}
0
Garbage value
Out of bound exception
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How will you identify a single dimensional array?
single curly brackets
single square brackets
multiple squares brackets
single angled brackets
6.
MULTIPLE CHOICE QUESTION
30 sec • Ungraded
If the data is in order the best search to use would be a______
Binary Search
Linear Search
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is returned by values[5]?
2
12
6
8
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
2D Arrays

Quiz
•
9th - 12th Grade
18 questions
Java Wiederholung

Quiz
•
12th Grade
25 questions
ict5_mt_w5-6_q2

Quiz
•
12th Grade - University
19 questions
JavaScript Data Structures

Quiz
•
9th - 12th Grade
20 questions
Java Objects - Medium Practice Quiz

Quiz
•
12th Grade
15 questions
Struktur Kontrol Perulangan, Array, dan Function (Bahasa C)

Quiz
•
10th Grade
18 questions
Java Array Quiz

Quiz
•
12th Grade
19 questions
Unit 5 - Two-Dimensional Arrays

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade