package com.lovcoding.day05.arr;

public class Test01Arr03 {
    //数组声明
    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};

        //索引设置
        studentNames[0] = "zkk";
        heights[0] = 1.86;
        ages[0] = (++ages[0]);

        //通过索引获取元素
        System.out.println("第一个人的姓名="+studentNames[0]);
        System.out.println("第一个人的身高="+heights[0]);
        System.out.println("第一个人的年龄="+ages[0]);

        //长度
        int length = studentNames.length; //获取长度之后 返回int 需要定义int类型变量去接收
        System.out.println(length);

        //数组
        System.out.println(studentNames);
    }
}
