...表示可變長參數(shù),就是說這個位置可以傳入任意個該類型參數(shù),簡單來說就是個數(shù)組。
創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站設(shè)計制作、網(wǎng)站建設(shè)、尼瀘西網(wǎng)絡(luò)推廣、成都微信小程序、尼瀘西網(wǎng)絡(luò)營銷、尼瀘西企業(yè)策劃、尼瀘西品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們大的嘉獎;創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供尼瀘西建站搭建服務(wù),24小時服務(wù)熱線:028-86922220,官方網(wǎng)址:aaarwkj.com(視頻教程推薦:java課程)
代碼示例:
1. testPoints(7); 2. testPoints(7,9,11); 3. testPoints(new Integer[]{7,9,11}); 1. public static void testPoints(Integer... itgr){ 2. if(itgr.length==0){ 3. System.out.println("沒有Integer參數(shù)傳入!"); 4. }else if(itgr.length==1){ 5. System.out.println("1個Integer參數(shù)傳入!"); 6. }else{ 7. System.out.println("the input string is-->"); 8. for(int i=0;i<itgr.length;i++){ 9. System.out.println("第"+(i+1)+"個Integer參數(shù)是"+itgr[i]+";"); 1.1個Integer參數(shù)傳入! 2.the input string is--> 3.第1個Integer參數(shù)是7; 4.第2個Integer參數(shù)是9; 5.第3個Integer參數(shù)是11; 6.the input string is--> 7.第1個Integer參數(shù)是7; 8.第2個Integer參數(shù)是9; 9.第3個Integer參數(shù)是11;
相關(guān)推薦:java入門教程
網(wǎng)站題目:java中的【...】表示什么意思
本文網(wǎng)址:http://aaarwkj.com/article20/cheoco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗、微信小程序、企業(yè)網(wǎng)站制作、品牌網(wǎng)站設(shè)計、網(wǎng)站收錄、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)