How do we access data in an array

Java Quizz

Quiz
•
Other
•
University
•
Easy
Peruvayila Vikram
Used 2+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
using operator
using variable
using index
using pointer
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following java program
class Demo
{
public static void main(String args[])
{
int a[] = new int[3];
System.out.println("a[0] is "+a[0]);
}
}
compilation error
runtime error
0
1
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is the correct way of importing an entire package ‘pkg’?
import pkg.
Import pkg.
import pkg.*
Import pkg.*
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following package stores all the standard java classes?
lang
java
util
java.packages
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following program
import java.util.*;
class Launch {
public static void main(String args[]) {
int array[] = new int [5];
for (int i = 5; i > 0; i--) {
array[5 - i] = i;
}
Arrays.sort(array);
System.out.print(Arrays.binarySearch(array, 4));
}
}
2
3
4
5
Similar Resources on Quizizz
10 questions
Algoritma Struktur Data (1)

Quiz
•
University
10 questions
Core Java Quiz - 2

Quiz
•
University
10 questions
Understanding Arrays in Programming

Quiz
•
University
10 questions
c set 3

Quiz
•
University
10 questions
A & R Week 7 Industry session assessment

Quiz
•
University
10 questions
Java Quiz

Quiz
•
University
10 questions
Arrays - 2D

Quiz
•
University
6 questions
Elementary Java 2

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade