📜  boucle for avec un tableau java 代码示例

📅  最后修改于: 2022-03-11 14:52:48.203000             🧑  作者: Mango

代码示例1
int tab[] = {1,2,3,4};
for (int i : tab) {
  systeme.out.println(i); //fct to print with eclipse
}
//console : 
1
2
3
4
//same as
for (int i = 0; i++; i < tab.lenght) {
    systeme.out.println(i); //fct to print with eclipse
}