java tutorial - c# vs java - java programming - learn java - java basics - java for beginners
What is C# ?
- C# is a general purpose programming language that initially appeared in 2000, as part of Microsoft’s .NET initiative.
- It was designed for the Common Language Infrastructure (CLI)—an open specification developed by Microsoft and standardized by ISO as well as ECMA.
- C# applications are compiled into bytecode that can be run on implementations of the CLI.
What is Java ?
- The Java released by Sun Microsystems in 1995, Java is also a general purpose programming language that was designed with the specific goal of allowing developers to “write once, run anywhere.”
- Java applications are compiled into bytecode that can be run on implementations of the Java Virtual Machine (JVM). Like CLI, JVM helps bridge the gap among source code and 1s and 0s that the PC understands.
Difference between c# and java
Java | C# |
---|---|
It 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. |
Java 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). |
Java type safety is safe. | C# type safety is unsafe. |
In java, built-in data types that are passed by value are called primitive types. |
In C#, built-in data types that are passed by value are called simple types. |
Arrays in Java are direct specialization of Object. |
Arrays in C# are specialization of System. |
Java does not support conditional compilation. |
C# supports conditional compilation using preprocessor directives. |
Java doesn't support goto statement. | C# supports goto statement. |
Java doesn't support structures and unions. | C# supports structures and unions. |
Java supports checked exception and unchecked exception. |
C# supports unchecked exception. |