package com.karl1; public class ArrayDemo2 { public static void main(String[] args) { //数组的遍历 int[] ages = {12,24,36}; // 0 1 2 for (int i = 0; i < ages.length; i++) { System.out.println(ages[i]); } //快捷:数组名.fori+回车 } }
标签:遍历,int,ages,数组名,数组,public From: https://www.cnblogs.com/Karl-hut/p/17437939.html