package com.lovcoding.day05.arr;

public class Test01Arr04 {
    //数组声明
    public static void main(String[] args) {

        //班级人员名称
        String[] studentNames = new String[]{"zs","ls","ww"} ;
        //身高
        double[] heights = {1.76,1.8,1.62} ;
        //年龄
        int[] ages = {18,22,17};

        //遍历改变身高
        //i = 索引
        //heights.length -1 = 最大索引  使用的是 < 索引不用-1
        for (int i = 0; i < heights.length; i++) {
            heights[i]+=0.1; //每个人+0.1
        }

        //查看
        for (int i = 0; i < heights.length; i++) {
            System.out.println(heights[i]);
        }

        //班级人员名称 增强for
        for (String studentName : studentNames) {
            System.out.println(studentName);
        }
    }
}
