vejam o codigo abaixo:
a.length me retorna o numero de linhas… mas como se faz para saber o numero de colunas ?
obrigado
public class Teste
{
public static void main(String[] args)
{
int numColunas = 5;
int a[][] = { {11,12,13,14,15} ,{21,22,23,24,25} ,{31,32,33,34,35} };
for (int i = 0; i < a.length; i++)
for (int j = 0; j < numColunas; j++)
System.out.println(a[i][j]);
}
}
