java method to return array or nil and optionally provide error message
<p>I have a method that contacts web service, parse and return an array of custom objects. The service will also pack some error message in the response some times.</p>

<p>I want my method while returning the array of custom objects, should able to update error message when available on something similar to output parameters.</p>

<p>It appears Java does not support out parameters. In objective-C, many methods takes pointer like &amp;error as a last argument to update the error.</p>

<p>Is there a way to achieve this in Java?</p>
