Arrays in Java

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Jharna Marwah[UHD]
Used 235+ 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
19 questions
Unit 5 - Two-Dimensional Arrays

Quiz
•
9th - 12th Grade
20 questions
Algoritmi Java

Quiz
•
11th Grade
22 questions
AP CSA Algorithms Practise

Quiz
•
11th Grade
18 questions
STATIC KEYWORD IN JAVA

Quiz
•
9th - 12th Grade
17 questions
"switch" Java Statement - 1

Quiz
•
9th - 10th Grade
15 questions
Array

Quiz
•
10th - 12th Grade
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops

Quiz
•
9th Grade - University
20 questions
Array

Quiz
•
12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade