for打印数组

package com.liu.struct;

public class ForDemo4 {
public static void main(String[] args) {
int[] numbers ={10,20,30,40,50};
for (int i = 0; i < 5; i++) {
System.out.println(numbers[i]);
}
System.out.println("====================");

for(int x :numbers){ //将numbers的每个值赋给x。
System.out.println(x);
}


}
}

for打印数组

上一篇:【shell】nc命令参数


下一篇:(MAC)selenium python运行时报错ImportError: Start directory is not importable: '/Users/may/Documents/automatortest/frame_mp\\src\\test_case'