Since your uu
is an array of array
. So, when you iterate over it, you will first get an array
, and then you can iterate over that array to get individual elements.
So, your outer loop has int[]
as type, and hence that declaration. If you iterate through your u
in one more inner loop, you will get the type int
: -
for (int[] u: uu) {
for (int elem: u) {
// Your individual element
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…