Question: Java Array Question In TwoDimensionalArray.java, we have a two dimensional array called twoDimArray and two one-dimensional arrays, arrayone and arrayTwo. You will copy the CONTENTS

Java Array Question

Java Array Question In TwoDimensionalArray.java, we have a two dimensional array calledtwoDimArray and two one-dimensional arrays, arrayone and arrayTwo. You will copy the

In TwoDimensionalArray.java, we have a two dimensional array called twoDimArray and two one-dimensional arrays, arrayone and arrayTwo. You will copy the CONTENTS of arrayone into twoDimArray[O] and the CONTENTS of arrayTwo into twoDimArray[1]. Use two nested loops and index 0 of the first dimension of twoDimArray means choosing arrayone as the array to copy and index 1 of the first dimension means choosing arrayTwo. public class TwoDimensionalArray ( public static void main(String[] args) { int[][] twoDimArray = new int[2][5]; int[] arrayOne = {5, 9, 55, 23, 89}; int[] arrayTwo = {15, 3, 23, 19, 64}; * /* copy arrayOne and arrayTwo into twoDimArray */ /* print out the first list of 5 numbers in twoDimArray on one line, and the second list of 5 numbers in twoDimArray on the next line */ * /* the solution should use nested loops: one loop to loop over * each array in twoDimArray, and one loop to loop over each element * in that array */ System.out.println("twoDimArray is " + twoDimArray); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!