In
Java, a 2D array is really just an array of arrays. So when you get the length of the outer array, you are simply asking how many inner arrays there are - which is four. If you wanted to find the total amount of values that can be stored in the 2D array you could:
1) If you know each inner array is the same size: Look at the length of values[0], and multiply that by the length of values
2) If you allow that each inner array is independent and can have different sizes, ten you must loop through each index of the outer array, and sum the lengths of the inner arrays