Java可变参数

可变参数:

一、使用规则:需要定义在参数列表的最后;

二、格式:数据类型… 数组名;

//public void test(int… arr);

//public void test(String str,int… arr);

三、注意点:不支持重载;

posted @ 2019-07-24 10:43  开拖拉机的拉风少年  阅读(222)  评论(0)    收藏  举报