java的可变参数调用实例

2016-5-30 流沙 Android

直接上代码,几个注意点: package com.gyarmy.oop; public class TestArgs { public static void main(String[] args){ TestArgs t = new TestArgs(); t.sayHello(); t.sayHello("youku"); int p = t.getSum(1,2,3,4,5,65,67,7); System.out.println(p); } public void sayHello() { System.out.println...

阅读全文>>

标签: java基础 可变参数

评论(0) 浏览(452)


Powered by 流沙团