title: Can a Java varargs be null?
body: <p>I found myself checking for this and asking if it's necessary. I have code like this:</p>
  
  <pre><code>public Object myMethod(Object... many) {
    if (many == null || many.length == 0)
      return this;
    for (Object one : many)
      doSomethingWith(one);
    return that;
  }
  </code></pre>
  
  <p>But then I wondered... Am I being too cautious? <strong>Do I have to check if <code>many == null</code>? Is that ever possible in any current Java version?</strong> If so, how? If not, I'll probably keep checking, just for futureproofing in case Oracle decides it can be null one day.</p>