How similar is C# to Java?
Brand new to C# as of today but got the incentive to learn it at my new internship. After the first video, "public static void Main (string[] args)" instantly popped out. Obvious to anyone as familiar with java as I am. Going further with C# is there any advice as to the similarities and differences? And/or anything else I should know about the language before I dive in? Thanks
Nilesh JadavPosted May 31, 2017, 10:31 AM
Well major similaritie is that both are based on OOP concept, Java is more concerned towards enterprise based functionality, whereas C# is more conecerned towards application and subject based.
Similarities of java and C#
On the syntax level, Java was influenced by Smalltalk, while C# tried to stay closer to C/C++ (eg: compare Java's extends and implements with C#'s : notation) and took a vague inspiration from VB on those concepts that weren't mappable to C/C++ (example: property syntax).
On the features level, C# 1 was definitely close to Java. Among the few differences they had, I'd highlight C#'s support for "unsafe" code (including pointers) and for delegates; and Java's controversial throws. This makes sense, since one of the goals of C# was to become an alternative to Java.
Many language features differ heavily on implementation details. For example, enums are very C'ish on C#, but are full objects in Java; or generics are implemented on the IL-level in C#, but in Java are dealt with via type erasure (neither is really close to C++'s templates besides syntax).
On the API level, they are worlds apart. C# relies on the .Net Framework, which was built on Microsoft's experience with the Visual Studio family of products (and thus is significantly Windows-oriented), while Java's Class Library was built, IIRC, from scratch, and heavily evolved over time.
Helpful Links :
http://www.includehelp.com/dot-net/similarity-and-differences-between-c-sharp-and-java.aspx
https://rayli.net/blog/programming/top-10-differences-between-java-and-c/
https://www.daniweb.com/programming/software-development/threads/310485/c-java-and-c-similarities-and-differences
Incase you cant view the image, I had also uploaded the full view image in rar file, attach below.
Hope that helps !