first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Java Fundamentals: “Comparison of Java and C Sharp”; C#; Anders Hejlsberg; Borland; wikipedia.org

C# allows restricted use of pointers. …Java does not allow pointers or pointer-arithmetic to be used.

C# allows the programmer to create user-defined value types, using the struct keyword.

Enumerations in C# are derived from a primitive 8, 16, 32, or 64 bit integer type. Any value of the underlying primitive type is a valid value of the enumeration type, though an explicit cast may be needed to assign it. C# also supports bitmapped enumerations where an actual value may be a combination of enumerated values bitwise or'ed together. Enumerations in Java, on the other hand, are objects.

C# allows a class definition to be split across several source files using a feature called partial classes. …Java has no corresponding concept.

Generics in Java are a language-only construction; they are implemented only in the compiler. …This technique of implementing generics is known as type erasure. This means that runtime information about the actual types is not available at runtime, and imposes some restrictions such as the inability to create new instances or arrays of generic type arguments.

get, set C# implements properties as part of the language syntax with their optional corresponding get and set accessors, as an alternative for the accessor methods used in Java, which is not a language feature but a coding pattern based on method name conventions.

By contrast, C# is a relatively new language. Microsoft has studied existing languages such as Java and Object Pascal, and has changed some aspects of the language and runtime environment in response to perceived failures and difficulties with its predecessors. C# accommodates constructs more commonly found in languages such as C++, Delphi (designing which was Anders Hejlsberg's principal job when he was at Borland), and, in recent C# versions, borrows from dynamic scripting languages such as Ruby.

[http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java]

mod date: 2008-12-02T21:59:02.000Z