public class GrammaticalSugarDemo { public static void main(String args[]){ GrammaticalSugarDemo demo = new GrammaticalSugarDemo(); demo.doSomething(2); demo.doSomething(3,2,1); } public void doSomething(int ... a){ for(int i = 0;i<a.length;i++){ System.out.println(a[i]); } } }
语法糖demo
最新推荐文章于 2024-02-18 17:16:58 发布