📜  java代码示例中如何知道变量的有效名称是什么

📅  最后修改于: 2022-03-11 14:52:41.556000             🧑  作者: Mango

代码示例1
String[] cookies = {"Oatmeal", "Snickerdoodle", "Chocolate chip", "Gingersnap"};

        for(String i : cookies){
            System.out.println(i);
            System.out.println("Shortbread");
        }