Question: getElement The change from one - dimensional array to two - dimensional array involves another set of square brackets. Below are two declarations to demonstrate
getElement
The change from onedimensional array to twodimensional array involves another set of square brackets. Below are two declarations to demonstrate this simple change.
int oneD;
int twoD;
Remember that the order in which to access elements should be rowcol So myD is accessing row and column Since this one is now using a twodimensional
array, let's help you with the header!
public static int getElementint data, int row, int col
use the syntax of accessing an element of a twodimensional array below. Be sure to return the value.
return data;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
