且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Java数组初始化

更新时间:2022-02-08 00:11:05

您需要语法如下:

for(int n : new int[]{1, 2, 3})
   System.out.println(n);