Popular posts from this blog
C# and Java Language History and Evolution
This post will describe C# and Java language history and evolution C# Microsoft earlier implemented a modified version of Java, which was called J++ and a modified version of the Java Runtime Environment (JRE). In 1997, Sun Microsystems sued Microsoft, stating that Microsoft added new features in a manner that contravened Sun's standards and conventions for Java platform neutrality, and which features therefore violated the license agreement between Microsoft and Sun. The suit was settled in 2001: Microsoft agreed to pay Sun $20 million and gradually phase out the Microsoft JRE over seven years. At time of the settlement Microsoft had already revealed the first version of C# which was based on .NET as opposed to the JRE. While developing C#, Anders Hejlsberg's team at Microsoft studied a number of existing languages including C++, Java, Modula-2, C and Smalltalk. The most notable differences was the C# support for delegates and events, metadata attri...
Application Development in Java and C#
Brief similarity Both C# and Java Are Object-Oriented Languages Both C# and Java are designed from the ground up as object-oriented languages using dynamic dispatch, with syntax similar to C++ (C++ in turn derives from C). Neither language is a superset of C or C++, however, any class in either language implicitly (or explicitly) subclasses an object. This is a very nice idea, because it provides a default base class for any user-defined or built-in class. Covariance and contravariance Covariance and contra variance is supported by both languages. Java has use-site variance that allows a single generic class to declare members using both co- and contravariance. C# has define-site variance for generic interfaces and delegates. Variance is not supported directly on classes but is supported through their implementation of variant interfaces. C# also has use-site covariance support for methods and delegates. Garbage Collection Garbage collection which ...
Comments
Post a Comment