Sunday, May 22, 2011

C# and Java Programming Languages

There has been many arguments about similarities and differences between C# and Java programming languages. C# was developed by Microsoft in 2000 while Java originally developed by James Gosling and released in 1995 as a core component of Sun Microsystems' Java platform which is now owned by Oracle. C# has always been seen as just a stolen copy of Java. However, C# developers refused to acknowledge that accusation. The focus of this essay is mainly on areas where they differ and similar.

In fact, the two languages share many features and they are more alike than they are different, and most of the C# is same as Java. For instance, both C# and Java are class-based object-oriented with similar syntax. C#, just like Java, are designed with runtime compilation and both use garbage-collection which attempts to remove the objects that are no longer in use by the program. Furthermore, both languages can be used for Web development. Although they have many features and libraries in common, there are some major differences between them.

In many cases, these two langueges are quite different. Firstly, Java is older than C# and has built up a large and highly active user base. By contrast, C# is a new language. Microsoft has studied existing languages such as Java and Object Pascal, and has changed some aspects of the language and runtime environment. Besides, a Java program is usually complied into an intermediate code, which can be executed on any computer with any operating system, as long as Java Virtual Machine exists on that computer. In contrast, programs written in C# generally can run only on Windows. Another major difference is that C# supports multiple inheritance whereas Java does not. In addition, new Java features can be discussed and voted in an open democratic forum. On the other hand, Microsoft does not have a forum like this which is unfortunate for anyone trying to program in C#. Lastly, C# complements the underlying operating system while Java tends to hide it.

In conclusion, maybe a question crosses our mind; Which is better? None is better over the other. It depends on what a programmer wants to use. Java is currently the only choice for cross platform development. C# however, appears to be a good replacement for C, especially on the client side. If one gained one language, there will be certainly no problem picking up the other.


Resourses:
http://en.wikipedia.org
http://genamics.com/developer/csharp_comparative.htm
http://www.codeproject.com/KB/cs/Java_and_C.aspx

No comments:

Post a Comment