1D Array Java

1D Array Java

9th Grade - University

14 Qs

quiz-placeholder

Similar activities

CSA Unit 3 Review

CSA Unit 3 Review

10th - 12th Grade

16 Qs

APCSA Unit 6

APCSA Unit 6

10th - 12th Grade

14 Qs

APCSA Unit 6.2

APCSA Unit 6.2

10th - 12th Grade

14 Qs

AP Computer Science Principles Arrays

AP Computer Science Principles Arrays

10th - 12th Grade

14 Qs

Lecture 4.4 Part 2

Lecture 4.4 Part 2

12th Grade

11 Qs

Java 1D Arrays

Java 1D Arrays

University

15 Qs

Area and Arrays

Area and Arrays

10th - 12th Grade

15 Qs

AP CSA Array List

AP CSA Array List

10th Grade

11 Qs

1D Array Java

1D Array Java

Assessment

Quiz

Computers

9th Grade - University

Easy

Created by

Dara Kirschenbaum-Perry

Used 140+ times

FREE Resource

14 questions

Show all answers

1.

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

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For the array:

int stats[3];

What is the range of the index?

0 to 3

0 to 2

1 to 3

0 to 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int [] nums = {2, 3, 5, 8, 9, 11};

How would you access the fourth element in nums?

nums[4]

nums[3]

nums(4)

nums(3)

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

The first value of an array called quizzes can be accessed with which of the following statements?
quizzes[1] = 100;
quizzes[0] = 100;
quizzes[zero] = 100;
quizzes[one] = 100;

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following statements outputs the fifth value in the quizzes array?
System.out.println(quizzes[5]);
quizzes[4];
quizzes[5];
System.out.println(quizzes[4]);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Index values of an array range from ______________.
0 to length – 1
1 to length
0 to length
0 to length + 1

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Create an array of 12 strings called months.
String[] months = new String[12];
String months = new String[12];
String[] months = new String[];
String[12] months = new String[];

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?