Learn: What are the differences between C#.Net programming language and Java programming language? What are their similarities and dissimilarities?
C#.Net and Java both are the programming languages, which are most popular and widely used. In this post we are going to learn about C#.Net and Java similarities and dissimilarities (differences between of them).
C#.Net and Java similarities:
- C# and Java both are the object oriented programming languages.
- C# and Java both are the languages descended from C and C++.
- Both C# and Java compilers generate an intermediate language code after compilation:
- C# compiler generates Microsoft Intermediate Language (MSIL), and Java compiler generates Java byte code.
- In each case the intermediate code can be run - by interpretation or just-in-time compilation - on an appropriate virtual machine.
- In C#, however, more support is given for the further compilation of the intermediate language code into native code.
- Both languages include advanced features, like garbage collection, which remove some of the low level maintenance tasks from the programmer.
- In a lot of areas they are syntactically similar.
- Just like java, C# programming also gives up on multiple class inheritance in favor of a single inheritance model. C# supports the multiple inheritances of interfaces.
C#.Net and Java Differences:
- C# developed by Microsoft, while Java developed by sun-microsystem.
- Founder of C# is Anders Hejlsberg. And Founder of JAVA is James Gosling.
- C# contains more fundamental data types than Java, and also allows more extension to the value types.
- C# supports enumerations, type-safe value types which are limited to a defined set of constant variables, and structures, which are user-defined value types.
- Java doesn't have enumerations, but can specify a class to emulate them.
- Java does not support operator overloading while C# supports operator overloading of multiple operators.
- In Java programming, the concept of jagged array is introduced; these (jagged arrays) are implemented solely with single-dimensional arrays where arrays can be members of other arrays. In C#, we can also implement genuine rectangular arrays (which may the replacement of jagged array)
- Concept of class properties used in C#. It does not supported by JAVA.
- JAVA does not support delegates, while C# uses delegates, which are type-safe method pointers. These are used to implement event-handling.
- C# uses CLR (Common Language Runtime) while JAVA uses JVM (Java Virtual Machine).
No comments:
Post a Comment