Iterative Java Loop Through Person Objects Array

1/1
100%

for(Personne p:tab){

System.out.println(p);

}

/\*

\* similiaire à

\*

Publicité

for(int i=0;i<tab.length;i++){

System.out.println(tab[i]);

}

Personne[] tab={new Personne("a", "z", 10), new Personne("b", "k", 30)};

Personne[] tab = new Personne[]{p1,p2};

Personne[] tab = new Personne[];

Publicité

tab[0]=p1;

tab[1]=p2;

Iterative Java Loop Through Person Objects Array

Programming, Math, etc. · course

Voir tous les documents en programmation

for(Personne p:tab){

System.out.println(p);

}

/\*

\* similiaire à

\*

Publicité

for(int i=0;i<tab.length;i++){

System.out.println(tab[i]);

}

Personne[] tab={new Personne("a", "z", 10), new Personne("b", "k", 30)};

Personne[] tab = new Personne[]{p1,p2};

Personne[] tab = new Personne[];

Publicité

tab[0]=p1;

tab[1]=p2;