title: Why Java methods with varargs identified as transient?
body: <p>I was playing with Java Reflection API and observed that methods with variadic argument list become transient. Why is that and what does <code>transient</code> keyword mean in this context? </p>
  
  <p>From Java Glossary, <strong>transient</strong>:</p>
  
  <blockquote>
    <p>A keyword in the Java programming language that indicates that a field is not part of the serialized form of an object. When an object is serialized, the values of its transient fields are not included in the serial representation, while the values of its non-transient fields are included.</p>
  </blockquote>
  
  <p>However this definition does not say anything about methods. Any ideas?</p>
  
  <pre><code>import java.lang.reflect.Method;
  import java.lang.reflect.Modifier;
  
  public class Dummy {
      public static void main(String[] args) {
          for(Method m : Dummy.class.getDeclaredMethods()){
              System.out.println(m.getName() + " --&gt; "+Modifier.toString(m.getModifiers()));
          }
      }
  
      public static void foo(int... args){}
  }
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>main --&gt; public static
  foo --&gt; public static transient
  </code></pre>