Grace is a computer science student who needs to create an array of student ids for her project. The ids she needs to include are 115331, 450055, 555641, 875560, and 987555.

array read and access

Quiz
•
Computers
•
University
•
Medium
ZURAIDAH Moe
Used 5+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int [ ] id = new {115331, 450055, 555641, 875560, 987555};
int [5] id = {115331, 450055, 555641, 875560, 987555};
int [ ] id = {115331, 450055, 555641, 875560, 987555};
int [ ] id = new int [5];
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Hannah is working on a Java project where she needs to create an array of subject codes for her classes. The subject codes are S, M, C, P, I, and K. How should she declare this array in Java?
char [ ] code = {'S', 'M', 'C', 'P', 'I' and 'K'};
char [ ] code = {S, M, C, P, I, K};
char [ ] code = {"S", "M", "C", "P", "I", "K"};
char [ ] code = {'S', 'M', 'C', 'P', 'I', 'K'};
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to display the size of an array name studentname[ ] which contains the names of students in a class, including Abigail, Charlotte, and Harper.
System.out.println("The size is " + studentname[ index ]);
System.out.println("The size is " + studentname.length);
System.out.println("The size is " + length.length);
System.out.println("The size is " + studentname);
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to display all elements of array studentname[ ].
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to read elements into array studentname[ ].
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Java code to read elements into array customerid[ ].
None of the above is the right answer.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
A code segment to identify the largest element in an array.
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
Array output

Quiz
•
University
15 questions
Java Programming

Quiz
•
University
15 questions
ARRAYLIST - JAVA

Quiz
•
University
11 questions
Java Quiz 3 - Array

Quiz
•
University
10 questions
Java Control Flow statements

Quiz
•
University
10 questions
Java Basics

Quiz
•
University
12 questions
Array

Quiz
•
University
15 questions
Array Java

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