Edit Game
Arrays in Java
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public



 Save

Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   16  Close
Index values of an array range from ___________ to ___________.
0 to length – 1
True of False: An array has a fixed length.
True
Each element in a String array is automatically initialized to ___________.
null
What is the correct statement that gives the length of the array data?
data.length
What is the correct way to create an array of 12 strings called months?
String[ ] months = new String[12];
How would you access the fourth element in array nums?
nums[3]
True or False: An array can be used to store different types of data; such as: doubles and integers together.
False
What is the correct way to create an array called nums with the following three numbers? 12 8 15
int[ ] nums = {12, 8, 15};
What value is stored at index 1 in this array?
Dennis
What value is stored in each of the 5 elements in the following array?
0
What is the correct way to declare and initialize an integer array called numbers with 10 elements?
int [ ] numbers = new int[10];
What does the following code segment print out?
6
What does the following code segment print out?
2
What does the following code segment print out?
4
Given the following declaration, what are the legal index values for the array ar?
0, 1, 2, 3
What is the term that refers to a collection of related elements used to store the same type of data called?
Array