小例子呈上,方便以后查看 public class ForEach { public void test() { int arr[] = { 2, 3, 1 }; for (int x : arr) { System.out.println(x); } } public static void main(String[] args) { FoeEach t = new FoeEach(); t.test(); } }
转载请注明原文地址: https://ju.6miu.com/read-350111.html