I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it. I've been asked this question on my job interview and I thought it might be useful to learn a bit more.
These are the ones I could come up with:
Please add others you think are relevant.
Update: Just popped up my mind, Java doesn't have something like custom attributes on classes, methods etc. Or does it?
Comparing Java 7 and C# 3
(Some features of Java 7 aren't mentioned here, but the using
statement advantage of all versions of C# over Java 1-6 has been removed.)
Not all of your summary is correct:
Beyond that (and what's in your summary already):
List<byte>
as a byte[]
backing it, rather than an array of boxed bytes.)ref
and out
for passing parameters by referenceThis is not exhaustive, but it covers everything I can think of off-hand.