I think that java is good for .net in that the designers where able to
look at java and make design decisions based on what is right and what
is wrong with the java implementation. On the other hand .net is
good for java because many of the great features of .net will find
their way into java via open sources projects and/or additions to the
language.
One place where java is lacking is XML serialization of objects.
In .net this is very trivial and the whole thing can be controlled by
attributes. In java attributes are new to 1.5 and there is no
built in serialization. Fotuneately, java has a huge open-source
community. I've found a product named Xstream which makes object
to xml serialization very easy. A couple caveats: version 1.1
does not handle serializing properties to attributes. Also,
serialization must be controlled through code as java just got
attributes so you can't mark a property with an attribute in the code
to control serialization.
I've used Xstream and it is very easy to use. If you are looking
for a very easy serialization library for java then Xstream is your
best bet. I have not found another library that works like this
and is at a production level.
Here is the link:
http://xstream.codehaus.org