codice:
for (int i = 0; i< m.length; i++)
  for(int j = 0; j < m[0].length; j++){
 //// fai le operazioni
}