java 多参实现
package com.northeasttycoon.monitor.service; import static java.lang.System.out; /** * Created by northeasttycoonon 2015/9/20. */ public class ServerMessager { public void print(String... args) { for (int i = 0; i < args.length; i++) { out.println(args[i]); } } public void print(String test) { out.println("------dddd----"); } public static void main(String[] args) { ServerMessager test = new ServerMessager(); test.print("northeasttycoon"); test.print("northeasttycoon", "northeasttycoon"); } }