[Java]取得某陣列維度大小

string[,] aryStr = new string[3, 4]; //二維陣列
aryStr.GetUpperBound(0)); //2 =>  0到2
aryStr.GetUpperBound(1)); //3 =>  0到3
aryStr.GetUpperBound(2)); //會掛,只有二維