package InitializeAndCleanUp.part8;

/**
 * Created by chenyang on 2017/1/19.
 */
public class OptionalTrailingArguments {
    static void f(int required,String... trailing)
    {
        System.out.println("required:"+required+" ");
    }
}

@@ -34,16 +34,55 @@
 8;%0A%0A/**%0A
+ * %E5%8F%AF%E5%8F%98%E5%8F%82%E6%95%B0%E5%8F%AF%E4%BB%A5%E6%98%AF0%E4%B8%AA%E5%8F%82%E6%95%B0%0A * %E5%BD%93%E5%85%B7%E6%9C%89%E5%8F%AF%E9%80%89%E7%9A%84%E5%B0%BE%E9%9A%8F%E5%8F%82%E6%95%B0%E6%97%B6%EF%BC%8C%E8%BF%99%E4%B8%AA%E7%89%B9%E6%80%A7%E5%BE%88%E6%9C%89%E7%94%A8%E3%80%82%0A
  * Creat
@@ -266,16 +266,241 @@
 d+%22 %22);%0A
+        for(String s:trailing)%7B%0A            System.out.println(s+%22 %22);%0A        %7D%0A        System.out.println();%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        f(1,%22one%22);%0A        f(2,%22two%22,%22three%22);%0A        f(0);%0A
     %7D%0A%7D%0A

update code