java.util.Date cannot be cast to Object[]
<p>I'm using java reflection to call methods at runtime. How do I cast a date object into an object array?</p>

<p>ie,</p>

<pre><code>Method m = ....;
Object[] result = (Object[]) m.invoke(...);

public Date getDate() {
   return new Date();
}
</code></pre>

<p>Would give:</p>

<pre><code>java.lang.ClassCastException: java.util.Date cannot be cast to [Ljava.lang.Object;
</code></pre>

<p><strong>Edit</strong>: yeah, I should just add it to an Object array instead and return it.</p>
