-
However,
there are many ways in which C# is different from Java.
-
For example, C# has:
-
a foreach statement;
-
methods with a variable number of parameters;
-
autoboxing and auto-unboxing;
-
enumeration types;
-
annotating code with metadata.
-
All of these features were in the first version of
C#
released in 2000.
-
All of these features have now been added to Java.
-
Aside: there are other ways in which C#
is significantly different from Java,
e.g.,
value types, operator overriding,
properties, delegates, events.