title: adding an unknown number of parameters to a method call in Java
body: <p>I have a method that I want to expand (rather than writing a new method which does basically the same thing), by adding an unknown number of parameters to the end of the list of parameters.  </p>
  
  <p>If I do this, will I have to change all the calls to the method?  I guess the question is, does the unknown parameter include the case there being no parameter passed in at all?</p>
  
  <p>For instance, if I have a method:</p>
  
  <pre><code>queryFactory(int [] typeArgs, int queryType, int[] ... args){}
  </code></pre>
  
  <p>Could I call:</p>
  
  <pre><code>queryFactory(typeArgsInstce, queryTypeInstce)
  </code></pre>
  
  <p>And then when I need to add parameters to the query call:</p>
  
  <pre><code>queryFactory(typeArgsInstce, queryTypeInstce, argsInstce)
  </code></pre>
  
  <p>Where <code>argsInstce</code> is an array of integers containing extra arguments.</p>
  
  <p>I would like to just edit this method rather than writing a new one which does almost the exact same thing except it has some arguments to add to queries.  I will simply write another method if by editing this one I will have to change every other call to this method.</p>