Java vs C# - c# - c# tutorial - c# net
What is the difference between Java and C# ?
- Aside from the language-specific details, there is one difference between Java and C# that makes all the difference when choosing which programming language to use for a project.
- The difference is that C# is a Microsoft language, and Java is more or less open-source.
- There are many differences and similarities between Java and C#.

learn c# tutorial - java vs c# - c# Example
A list of top differences between Java and C# are given below:
No. | Java | C# |
---|---|---|
1) C | Java is a high level, robust, secured and object-oriented programming language developed by Oracle. |
C# is an object-oriented programming language developed by Microsoft that runs on .Net Framework. |
2) | Java programming language is designed to be run on a Java platform, by the help of Java Runtime Environment (JRE). |
C# programming language is designed to be run on the Common Language Runtime (CLR). |
3) | Java type safety is safe. | C# type safety is unsafe. |
4) I | In java, built-in data types that are passed by value are called primitive types. |
n C#, built-in data types that are passed by value are called simple types. |
5) | Arrays in Java are direct specialization of Object. | Arrays in C# are specialization of System. |
6) . | Java does not support conditional compilation. | C# supports conditional compilation using preprocessor directives |
7) | Java doesn't support goto statement. | C# supports goto statement. |
8) | java doesn't support multiple inheritance through class. It can be achieved by interfaces in java |
C# supports multiple inheritance using class. |
9) | Java doesn't support structures and unions. | C# supports structures and unions. |
10) | Java supports checked exception and unchecked exception. |
C# supports unchecked exception. |