What is the Java equivalent of creating an anonymous object in C#?
<p>In C#, you can do the following:</p>

<p><code>var objResult = new { success = result };</code></p>

<p>Is there a java equivalent for this?</p>
