Encontrando comprimento de matrizes em java
int size = arr[].length;
// length can be used
// for int[], double[], String[]
// to know the length of the arrays.
Utkarsh Rastogi