An initializer list can be used to create and store values in an array An initializer list is used whenever the values to be stored in the array are known beforehand. The code below creates the array, my List using an initializer list: double [] myList = 5.6, 4.5, 3.3, 13.2, 4.0, 34.33, 34.0, 45.45, 99.993, 11123}; myList reference my List[0] my List[1] 5.6 4.5 myList[2] 3.3 Аrray reference variable my List[3] 13.2 myList[4] 4.0 Array element at index 5 my List [5] Element value 34.33 myList[6] 34.0 my List[7] 45.45 myList[8] 99.993 myList[9] 11123 An array created using an initializer list is processed the same way as any other array The first element of the array,myList, is at index position 0, has the value 5.6 and is referenced by: myList [0] The 6th element of the myList Array is at index position 5. Its value is 34.33 and it is referenced by: myList [5] Please submit a screen print of the Eclipse editor showing your code and output with answers:

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

Write a Java class, XXX_Lab71, where XXX is your Kean email ID. The class
will do the following:
1) Create an Array which can contain 5 elements using an initializer list.
2) The values in the list will be: 11, 22, 33, 44, 55
3) Using an assignment statement, change the element at index position,
3, to 88.
4) Print the elements of the array from first to last using a loop. Use the
length property to print the elements.
5) Print the elements of the array from last to first using a loop. Use the
length property to print the elements.

An initializer list can be used to create and store values in an array
An initializer list is used whenever the values to be stored in the array are
known beforehand.
The code below creates the array, my List using an initializer list:
double [] myList =
5.6, 4.5, 3.3, 13.2, 4.0, 34.33, 34.0, 45.45, 99.993, 11123};
myList reference
my List[0]
my List[1]
5.6
4.5
myList[2]
3.3
Аrray reference
variable
my List[3]
13.2
myList[4]
4.0
Array element at
index 5
my List [5]
Element value
34.33
myList[6]
34.0
my List[7]
45.45
myList[8]
99.993
myList[9]
11123
An array created using an initializer list is processed the same way as any
other array
The first element of the array,myList, is at index position 0, has the value
5.6 and is referenced by:
myList [0]
The 6th element of the myList Array is at index position 5. Its value is
34.33 and it is referenced by:
myList [5]
Please submit a screen print of the Eclipse editor showing your code and
output with answers:
Transcribed Image Text:An initializer list can be used to create and store values in an array An initializer list is used whenever the values to be stored in the array are known beforehand. The code below creates the array, my List using an initializer list: double [] myList = 5.6, 4.5, 3.3, 13.2, 4.0, 34.33, 34.0, 45.45, 99.993, 11123}; myList reference my List[0] my List[1] 5.6 4.5 myList[2] 3.3 Аrray reference variable my List[3] 13.2 myList[4] 4.0 Array element at index 5 my List [5] Element value 34.33 myList[6] 34.0 my List[7] 45.45 myList[8] 99.993 myList[9] 11123 An array created using an initializer list is processed the same way as any other array The first element of the array,myList, is at index position 0, has the value 5.6 and is referenced by: myList [0] The 6th element of the myList Array is at index position 5. Its value is 34.33 and it is referenced by: myList [5] Please submit a screen print of the Eclipse editor showing your code and output with answers:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

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
  • SEE MORE 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