I am having a hard time understanding why putting brackets versus leaving them out either calls for the rows or cols in a 2D array. I get the syntax I just don't understand why it works that way? Should I just not worry about it and move on with my life?
double[][] values = {
{1.2, 9.0, 3.2},
{8.2, 8.6, -1.2},
{-7.3, 2.5, 9.7},
{4.1, 7.0, 5.1},
};
System.out.println("Number of Rows: " + values.length);
System.out.println("Number of Cols: " + values[0].length);