循环遍历1
package Array; /** * Project Name: one_java * File Name: Test01 * * @version 1.0 * @author:wenerduo * @Date: 2022/01/03/下午 2:09 * Copyright (c) 2022, */ public class Test01 { public static void main(String[] args) { int [] nums={1,23,12,3,4}; /* for ( int i=0;i<nums.length;i++){ System.out.println(nums[i]); }*/ int i=0; while (i<nums.length){ System.out.println(nums[i]); i++; } } }