Run the code. When Arrays2D.java runs as expected, make the following changes: 1.1. Change the value of the second row of the array to { 15, 16, 17, 18 }. 1.2. Print the values for each row on the same line. Program output should look like: 123 4 15 16 17 18- 8 10 12 14e 1.3. Add the following line at the end of the program: System.out.printIn( "The value of the first element onl the first row is" + pumbers[olro): This output should only appear once in a program run e
Run the code. When Arrays2D.java runs as expected, make the following changes: 1.1. Change the value of the second row of the array to { 15, 16, 17, 18 }. 1.2. Print the values for each row on the same line. Program output should look like: 123 4 15 16 17 18- 8 10 12 14e 1.3. Add the following line at the end of the program: System.out.printIn( "The value of the first element onl the first row is" + pumbers[olro): This output should only appear once in a program run e
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
Related questions
Question
100%
Please answer the question posted and give full explanation to the answer.
![Please remember to put your name and date of program completion in a comment at the top of
your .java file.
Create a Java project with the following code. Please remember to type in this code rather than copy-
and-pasting; Word loves to mangle source code.
Arrays2D.java:
// Student Name Today's Date
/**
* This program shows values being stored in an array's elements and displayed.
* From Gaddis Starting Out with Java, 6th Edition
*/e
public class Arrays2D {+
public static void main(String[] args) {"
int[][] numbers = { { 1, 2, 3, 4 }, «
{ 5, 6, 7, 8 }, +
{ 8, 10, 12, 14 } };-
for (int row = 0; row < numbers.length; row++) {-
for (int col = 0; col < numbers[row].length; col++) {-
System.out println(numbers[row][col]);-
}
Run the code. When Arrays2D.java runs as expected, make the following changes:
1.1. Change the value of the second row of the array to { 15, 16, 17, 18 }.
1.2. Print the values for each row on the same line.
Program output should look like:
123 44
15 16 17 18
8 10 12 14-
1.3. Add the following line at the end of the program: System.out.println( "The value of the first element
on the first row is" + numbers[0][0]); . This output should only appear once in a program run.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4cd974de-0ca5-43c4-9c5f-a02c9b7b2d9a%2F32bebc15-48d3-475f-8ea4-4f6060953d1d%2Fh9c64zn_processed.png&w=3840&q=75)
Transcribed Image Text:Please remember to put your name and date of program completion in a comment at the top of
your .java file.
Create a Java project with the following code. Please remember to type in this code rather than copy-
and-pasting; Word loves to mangle source code.
Arrays2D.java:
// Student Name Today's Date
/**
* This program shows values being stored in an array's elements and displayed.
* From Gaddis Starting Out with Java, 6th Edition
*/e
public class Arrays2D {+
public static void main(String[] args) {"
int[][] numbers = { { 1, 2, 3, 4 }, «
{ 5, 6, 7, 8 }, +
{ 8, 10, 12, 14 } };-
for (int row = 0; row < numbers.length; row++) {-
for (int col = 0; col < numbers[row].length; col++) {-
System.out println(numbers[row][col]);-
}
Run the code. When Arrays2D.java runs as expected, make the following changes:
1.1. Change the value of the second row of the array to { 15, 16, 17, 18 }.
1.2. Print the values for each row on the same line.
Program output should look like:
123 44
15 16 17 18
8 10 12 14-
1.3. Add the following line at the end of the program: System.out.println( "The value of the first element
on the first row is" + numbers[0][0]); . This output should only appear once in a program run.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 6 images

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education