Is there a functionality in Java similar to C#'s anonymous types?
11:17 22 Jul 2011

I was wondering if there exists a similar functionality in Java similar to C#'s anonymous types:

var a = new {Count = 5, Message = "A string."};

Or does this concept go against the Java paradigm?

EDIT:

I suppose using Hashable() in Java is somewhat similar.

java anonymous-types