DEV Community

coderDFC
coderDFC

Posted on • Updated on

Classes | C# vs Java

The biggest difference is that in c# default is private and in java it is public.

Other than that, both support generics, however c# also supports operator overloading.
Java says that they do not want to support it to avoid c++ << bit shift left that is used to print out stuff, cout << "hi";

C# also has glorified getters and setters called properties, but they are just getters and setters.

Overall no much differences.

Top comments (0)