什么是当您使用对象......作为一个参数叫? [英] What is it called when you use object... as a parameter?

查看:115
本文介绍了什么是当您使用对象......作为一个参数叫?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java中已经注意到,你可以有对象的功能......作为一个参数,然后方法将采取任何数量的对象作为参数,并把它当作一个数组。这个叫什么?我一直在试图寻找它,但它似乎......被搜索引擎忽略。
我似乎记得的printf用C做同样的事情。

I have noticed in Java that you can have a function with object... as a parameter and then method will take any number of objects as a parameter and treat it as an array. What is this called? I have been trying to search for it but it seems ... is ignored by search engines. I seem to remember printf in C does the same thing.

感谢。

推荐答案

这就是所谓的可变参数

这篇关于什么是当您使用对象......作为一个参数叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆