Difference Between C# and Java




C#Java
1. C# uses Common Language Runtime (CLR)1. Java uses Java Runtime Environment (JRE)
2. C# supports the struct data type2. Java doesn't supports struct data type
3. C# supports operator overloading.3. Java doesn't supports operator overloading.
4. C# type-safety is unsafe4. Java type-safety is safe.
5. C# supports goto statement.5. Java doesn't supports goto statement.
6. In C#, It uses static final to declare a class constant6. In Java, It uses const to declare a class constant
7. In C#, parameters are passed by reference7. In Java, parameters are passed by value
8. C# supports only unchecked exception8. Java supports checked and unchecked exception

Recommended Posts:

C#
    1. C# Features
    2. Difference Between C++ and C#
    3. Difference Between C# and Java
    4. .NET Framework
    5. Benefits of .NET
    6. C# Program Structure
    7. C# Command Line Arguments
    8. Console.ReadLine() and Console.WriteLine()
    9. C# Literals
    10. C# Data Types
    11. Scope of Variables in C#
    12. Boxing and Unboxing in C#
    13. C# Operators
    14. C# Type Casting