String[] abc = new String[3]{"a","b","c"}; for (String str : abc){ System.out.println(str); //这个地方的冒号就是遍历abc的集合,取出每一个元素 }