String ... String 三个点 jdk1.5的特性.才知道
生活随笔
收集整理的這篇文章主要介紹了
String ... String 三个点 jdk1.5的特性.才知道
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
String ... String 三個點 jdk1.5的特性.才知道
String... excludeProperty表示不定參數,也就是調用這個方法的時候這里可以傳入多個String對象。
?public static void main(String[] args) {
?? ???????? //測試,傳入多個參數
?? ???????? test("hello", "world", "13sd", "china", "cum", "ict");
?? ???? }
?? ???? public static void test(String... arguments) {
?? ???????? for (int i = 0; i < arguments.length; i++) {
?? ???????????? System.out.println(arguments[i]);
?? ???????? }
?? ???? } posted on 2008-10-31 11:09 luyu 閱讀(...) 評論(...) 編輯 收藏
String... excludeProperty表示不定參數,也就是調用這個方法的時候這里可以傳入多個String對象。
?public static void main(String[] args) {
?? ???????? //測試,傳入多個參數
?? ???????? test("hello", "world", "13sd", "china", "cum", "ict");
?? ???? }
?? ???? public static void test(String... arguments) {
?? ???????? for (int i = 0; i < arguments.length; i++) {
?? ???????????? System.out.println(arguments[i]);
?? ???????? }
?? ???? } posted on 2008-10-31 11:09 luyu 閱讀(...) 評論(...) 編輯 收藏
轉載于:https://www.cnblogs.com/luyuwww/archive/2008/10/31/2965107.html
總結
以上是生活随笔為你收集整理的String ... String 三个点 jdk1.5的特性.才知道的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【活动】畅想云端加油站,赢iPad
- 下一篇: 第5章 JVM调优