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.

原文链接:Classes | C# vs Java

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容