1. An array is a container that holds a group of values of a 2. Each item in an array is called an 3. Each element is accessed by a numerical 4. The index to the first element of an array is 0 and the index to the last element of the array is the length of the 5. Given the following array declaration, determine which of the three statements below it are true. int [] autoMobile = new int [13]; i. autoMobile[0] is the reference to the first element in the array. ii. autoMobile[13] is the reference to the last element in the array. ii. There are 13 integers in the autoMobile array. 6. In java new is a which is used to allocate memory

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1. An array is a container that holds a group of values of a
2. Each item in an array is called an
3. Each element is accessed by a numerical
4. The index to the first element of an array is 0 and the
index to the last element of the array is the length of the
5. Given the following array declaration, determine which of
the three statements below it are true.
int [] autoMobile = new int [13];
i. autoMobile[0] is the reference to the first element in
the array.
ii. autoMobile[13] is the reference to the last element in
the array.
ii. There are 13 integers in the autoMobile array.
6. In java new is a
which is used to allocate
memory
7. Declare a one-dimensional array named score of type int
that can hold9 values.
8. Declare and initialize a one-dimensional byte array
named values of size 10 so that all entries contain 1.
9. Declare and initialize a one-dimensional array to store
name of any 3 students.
10. Declare a two-dimensional array named mark of type
double that can hold 5x3 values.
11. What is the output of the given program?
String[][] names = { {"Mr. ", "Mrs. ", "Ms. "},
{"Smith", "Jones"} };
System.out.println(names[0][0] + names[1][0]);
System.out.println(names[0][2] + names[1][1]);
Transcribed Image Text:1. An array is a container that holds a group of values of a 2. Each item in an array is called an 3. Each element is accessed by a numerical 4. The index to the first element of an array is 0 and the index to the last element of the array is the length of the 5. Given the following array declaration, determine which of the three statements below it are true. int [] autoMobile = new int [13]; i. autoMobile[0] is the reference to the first element in the array. ii. autoMobile[13] is the reference to the last element in the array. ii. There are 13 integers in the autoMobile array. 6. In java new is a which is used to allocate memory 7. Declare a one-dimensional array named score of type int that can hold9 values. 8. Declare and initialize a one-dimensional byte array named values of size 10 so that all entries contain 1. 9. Declare and initialize a one-dimensional array to store name of any 3 students. 10. Declare a two-dimensional array named mark of type double that can hold 5x3 values. 11. What is the output of the given program? String[][] names = { {"Mr. ", "Mrs. ", "Ms. "}, {"Smith", "Jones"} }; System.out.println(names[0][0] + names[1][0]); System.out.println(names[0][2] + names[1][1]);
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education