Search Header Logo

Array in Java

Authored by Jamunadevi T

Computers

University

Used 14+ times

Array in Java
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is advantage of java array?

Code Optimization

Random access

Size No-Limit

Both A and B

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 In java, array elements are stored in ________ memory locations.

Random

Sequential

Sequential & Random

Binary search

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output for the following code?

class array_output

{ public static void main(String args[])

{ int array_variable[][] = {{ 1, 2, 3}, { 4 , 5, 6}, { 7, 8, 9}};

int sum = 0;

for (int i = 0; i < 3; ++i)

for (int j = 0; j < 3 ; ++j)

sum = sum + array_variable[i][j];

System.out.print(sum / 5); } }

8

9

10

11

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to sort an array?

Array.sort()

Arrays.sort()

Collection.sort()

System.sort()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to copy contents of array?

System.arrayCopy()

Array.copy()

Arrays.copy()

Collection.copy()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers