zhyuzh3d

关注

JavaSE——不定长参数

zhyuzh3d

关注

阅读 47

2022-03-26

public static void main(String[] args) {  
	test();  
    test("aaa");  
    test("aaa", "bbb");  
    test("aaa", "bbb", "ccc");  
}  
  
public static void test(String... args) {  
    for (String arg : args) {  
        System.out.println(arg);  
    }  
}

相关推荐

云竹文斋

C#不定长参数

云竹文斋 56 0 0

想溜了的蜗牛

hive udf 不定长参数

想溜了的蜗牛 13 0 0

四月Ren间

python函数不定长传参

四月Ren间 58 0 0

WikongGuan

Python使用eval给一个函数传不定长参数

WikongGuan 97 0 0

穆风1818

Python----函数的不定长参数--包裹位置参数*args、包裹关键字参数**kwargs

穆风1818 43 0 0

Jonescy

串口接收不定长数据的实现

Jonescy 61 0 0

沈芏

使用剩余参数完成不定长参函数定义 es6 230222

沈芏 89 0 0

一只1994

不定参数获取

一只1994 26 0 0

荷一居茶生活

可变参数(不定项参数)

荷一居茶生活 53 0 0

杨小羊_ba17

Golang 函数 不定参数

杨小羊_ba17 29 0 0

精彩评论(0)

0 0 举报