JAVA-数组遍历
package com.itheima;
public class shuzudemo1 {
public static void main(String[] args) {
//数组定义
// int[] arr=new int[]{98,99,100};
int[] arr={98,99,100,123};
// 数组遍历
for(int i=0;i<arr.length;i++){
System.out.println(arr[i]);
}
}
}
![](https://img2022.cnblogs.com/blog/2426413/202207/2426413-20220728215220003-1727953146.png)