增强型For循环

package base.baidua;

public class ForDemo3 {
public static void main(String[] args) {
int[] nembers = {5,6,9,20,50};//定义了一个数组

    for (int x :nembers){
        System.out.println(x);
    }
}

}

posted @ 2021-10-25 22:31  xxm555  阅读(31)  评论(0编辑  收藏  举报