当前位置:网站首页>String... Variable length parameter list
String... Variable length parameter list
2022-07-22 06:52:00 【Pre established technology】
See once String… when , What's the grammar , After searching for information , It was originally called variable length parameter list
String…
1. Parameter type is String;
2. The number of parameters is 0 individual , Or more ; String… It can be compared to an array String[], Variable array length ( The length can be 0, It can also be greater than 0)
public class DemoController {
public void test(String aa){
run();
run("a");
run("a","b");
run("a","b","c");
/* run("a","b","c",.......); */
run(new String[]{
"a","b","c","d","e"});
}
/*public void run(){ }*/
public void run(String... strings){
for (String item:strings) {
String s = item;
}
}
}
When calling run() when , Call parameterless methods first run(), When there is no parameter free method run(), Call again run(String… strings)
边栏推荐
- Automatic test software faster than LabVIEW, atecloud cloud test platform evaluation
- 7.15 week learning summary
- Qt之生成连接库
- 吉时利Keithley软件2600系列2635B|2636B|2651A|2657A NS-SourceMeter源表软件
- Chrome升级到80版本遇到的问题-系统登录不了的解决方法
- unity 3D 修改默认编辑器
- cpu比较
- U++ 学习笔记 悬浮Actor
- Device eth3 does not see to be present, delaying initialization
- How to get the specified GameObject in unity 3
猜你喜欢
U++ property ufunction Foundation
Leetcode 1217 playing chips [greedy] the leetcode road of heroding
When jetbrans rider formats code, {} does not wrap
Using jsonwebtoken to realize JWT authentication in node project
【数学基础】 foundation of mathematics :拉格朗日优化和对偶
Qt之QML虚拟键盘
U++ learning notes floating actor
Deeply understand the principle of Redux Middleware
QT—圖形視圖
Keithley software 2400 | 2401 | 2410 | 2420 | 2425 | 2430 ns SourceMeter source table software
随机推荐
232. Implement queue with stack (simple)
Credentials of browser cross domain requests
AT&T伪指令 以及对于CFI CFA的解释
PHP, TP5 keywords, word segmentation, fuzzy query and sorting according to query conditions
swagger接口导入Postman
想要制作沙盒游戏?那么这一款插件你一定不能错过(Unity3D)
Chrome升级到80版本遇到的问题-系统登录不了的解决方法
Package wechat Alipay desensitization
leetcode 225. 用队列实现栈(简单)
Is it worth buying Geely Xingrui's products to upgrade and increase cultural IP linkage?
LeetCode 1217 玩筹码[贪心] HERODING的LeetCode之路
还在用Unity开发游戏?那你就out了,试试用Unity做一个答题系统吧
Fairy test software can't be hidden | do you know "LabVIEW" belonging to Chinese people?
三菱PLC FX3U脉冲轴回原功能块(MC_Home_P)
Leetcode 814 binary tree pruning [dfs] the leetcode road of heroding
【FAQ】应用内支付服务无法拉起支付页面常见原因分析和解决方法
ApacheCon Asia 2022 开启报名:Pulsar 技术议题重磅亮相
office 2013 自定义样式,并且将样式设置为目录
HTC手机如何进行官方解锁Unlock
QT图形界面初学者项目 - 无人机群作战仿真模拟