It's been a couple of years since I last worked with Java.
Can you tell me what problems can be solved more elegantly in Java?

I am aware of the following benefits of Java:

* Java 'runs everywhere',
* Java has support for [units and
measures](http://www.javaworld.com/javaworld/jw-10-2007/jw-10-jsr275.html)
* (supposedly) better latency in Java
* [J2EE](http://en.wikipedia.org/wiki/J2EE) (I don't think there is an equivalent in .Net)
* different approach to generics (with odd circular definitions such as "Enum>", see [Ken Arnold](http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html))

What about generics - are there elegant Java examples that cannot be represented in C#? Or other APIs or libraries?

Thanks,

Jiří

P.S. some general links:

* Wikipedia [comparison article](http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java)
* [Comparing Java and C# Generics](http://www.jprl.com/Blog/archive/development/2007/Aug-31.html) -
Jonathan Pryor's web log