How do you use variable arguments to wrap a certain function taking an Object[]
<p>I have a method which takes key and its associated parameters in the following format.</p>

<pre><code>public String foo(String key, Object[] parameters) {..}
</code></pre>

<p>I would prefer to pass the parameters using a variable argument format. How should I do that?</p>

<p>I tried <code>public String foo(String key, Object... parameters) {..}</code> - But this seems to collide with the method definition given above.</p>

<p>Should I do something like the following and wrap this into the Object[] method?</p>

<pre><code>public String foo(String key, Object a) {..}
public String foo(String key, Object a, Object b) {..}    
public String foo(String key, Object a, Object b, Object c) {..}
</code></pre>
