
Introduction of Java and C# :
Java and C#, both are different languages. Java is developed by Sun Microsystems, and it was released in 1995, and if we talk about C# it’s developed by “Microsoft”.
Both are Object Oriented Programming Language, but lots of differences are there, we will see one by one.
Differences :
JAVA | C# |
Java does not support operator overloading. | C# supports operator overloading for multiple operators. |
Java supports JVM(Java Virtual Machine). | C# Supports CLR (Common Language Runtime) |
Java API are controlled by open community process. | C# API are completely controlled by Microsoft. |
In Java there can be only one public class inside a source code otherwise there will be compilation error. | In C#, there can be many public classes inside a source code. |
Java supports both checked and unchecked exceptions. | C# does not supports for checked exception. In some cases checked exceptions are very useful for smooth execution of program. |
Java is a robust and platform independent language. Platform independency of Java is through JVM. | C# code is windows specific. Although Microsoft is working to make it global but till now the major system does not provide support for C#. |
Java does not supports anyway use of pointers. | In C# pointers can be used only in unsafe mode. |
Java does not supports for conditional compilation. | C# supports for conditional compilation. |
Java does not supports for goto statement. Use of goto statement will cause error in Java code. | C# supports for goto statement. |
Java doesn’t support structures and unions. | C# supports structures and unions. |
Java supports strictfp keyword that means its result for floating point numbers will be same for various platform. | C# does not supports strictfp keyword that means it result of floating point numbers may not be guaranteed to be same across all platforms. |
Leave a Reply