
Array_to be discussF3
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
ZURAIDAH Moe
FREE Resource
Enhance your content in a minute
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
int[] myArray = {11, 22, 33, 44, 55};
Which of the following is the code to print the length of this array?
System.out.println(int[].myArray.length());
System.out.println(myArray.length);
System.out.println(myArray.length());
System.out.println(int[].myArray.size());
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String[] friends = {"John", "Mike", "Samantha", "Monica"};
which code is correct to print "Samantha" using array functionality?
System.out.println(friends[2]);
System.out.println(friends[3]);
System.out.println(friends["Samantha"]);
System.out.println(friends{2});
3.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Select correct code to create an array of "double" datatype of length 5.
double arr = double[5];
double{} arr = new double{5};
double[5] arr = new double[];
double[] arr = new double[5];
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the relationship between the length of an array and the last index of that array?
last-index is always 1 more than the length
last-index is 1 less than the length (but not always)
last-index is always 1 less than the length
last-index is always equal to the length
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Code to declare an array that stores the scores (mark) for 20 students.
double mark;
double [20] mark = new double;
double [ ] mark = new mark [20];
double [ ] mark = new double [20];
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Code to declare an array that stores the names of 15 students.
String [ ] name = new String;
String [ ] name = new String [15];
name = new String [15];
String [15] name = new String [ ];
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Java code to display the size of an array name studentname[ ].
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);
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Hashing
Quiz
•
University
20 questions
Basic Memory Management
Quiz
•
University
20 questions
C - Structures
Quiz
•
University
20 questions
Software Engineering Quiz Project Planning
Quiz
•
University
15 questions
ARRAYS AND FUNCTIONS
Quiz
•
University
13 questions
Tech Vocab I
Quiz
•
1st Grade - University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
15 questions
Round 2 Debug-The-Code
Quiz
•
University
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
10 questions
Identifying equations
Quiz
•
KG - University
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
HS2C2 AB QUIZIZZ
Quiz
•
1st Grade - Professio...
14 questions
Homonyms Quiz
Quiz
•
KG - University
16 questions
Parts of a Parabola
Quiz
•
8th Grade - University
10 questions
A Brief History of Geologic Time
Interactive video
•
11th Grade - University
15 questions
Black Friday/Cyber Monday
Quiz
•
9th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
