Comparing C# to Java - I Code in Both. Learn about the Differences and Similarities.

preview_player
Показать описание
Whether you are a programmer or project manager, developers are always defending their favorite programming language. To help determine what software engineering platform will work best for your next project, Chuck explains the differences and similarities of Java language/platform and C# and .Net platform.

From syntax to performance this presentation focuses on the developer experience on both platforms!

While Java and C# have lots of similarities, there are significant differences. Anyone wanting a better view, an objective view of the 2 platforms will learn in this video. With actual code samples and humor, Chuck hits on the major points.

Chapters:
0:00 Introduction
0:27 The Slap
0:48 Philosophy
2:18 What they have in Common
2:56 A Sample Class for Both
3:33 Primitives
4:37 Type Specifiers
5:35 Operator Overloading
5:58 Functional Programming
6:33 Exceptions
7:20 Garbage Collection
8:00 Generics
8:33 LInQ
8:58 Performance
10:16 Recommendations
Рекомендации по теме
Комментарии
Автор

As a developer who has a lot of experience in both of these languages, I believe you did a very good job in comparing the two. That said, I strongly believe if you CAN do what you want in C#, there's almost no argument that persuades you to use Java. Basically, if you have to use Java to use a certain library, by all means, do it. But if I had to choose either of these languages I would NEVER choose Java. There are so many things wrong with it (Unicode?)

gooroomp
Автор

C# has less boilerplate, fantastic syntactical sugar features which make coding a breeze (Once you know them), extension methods are really awesome for configuring services for application startup (IServiceCollection). The new MinimalApi makes writing API endpoints super simple and fast for simple dev testing etc. All in all, it feels like a more modern language which has matured well, unlike Java. Sorry if I ruffled some feathers but it's just my opinion. :)

vertcx
Автор

Another different is that Java developers wear glasses, because they can't C# ;)

suleman.khalid
Автор

C# only has two characters in its name, whereas Java has four. Obviously C# is faster to type. Java on the other hand takes up more of your life, two characters more to be precise, every time you need to mention it in an email or doc, etc... Of course, I only ever use C.

MarkVrankovich
Автор

Thanks for making this video, I was curious on the differences between these languages and you explained those differences very well!

iluvsyphonfilter
Автор

why I love C#:

- Async / Await
- Extension Methods
- Expression Bodies
- Optional Params
- Ref, Out Params
- Auto Properties
- Events, Delegates
- Linq
- Structs
- Interop


string.IsNullOrEmpty(), an important feature that java lacks😆

hk-four-sixteen
Автор

Chuck - great work, great content. Thank you for sharing your experience, your wisdom. I really like your level-headed language comparisons.
Having worked with software development for 40 yrs I cherish a valuable source when I see one. You earned my subscription after just one video.

rilauats
Автор

Thank you for this Chuck. As someone trained on Java and C++ I'd been wondering for some time what exactly the difference was in C#. After watching this and your C++ vs C# video, I now have a much better appreciation of the differences.

Going to see if you've made any videos on Kotlin now, as I'm learning that language on the side for funsies atm.

Cheers.

cyrusmagnus
Автор

Amazing comparison! My main language is C# and I recently learned Java and... I don't hate Java per say, but it just seems inferior to C# in every way, especially since C# is now multiplatform (though I've only ever used Windows anyway).

My typical workflow relies heavily on things like properties, events, nullables, and LINQ, so whenever I use Java I'm constantly bumping into inconvenience after inconvenience. Even if they're minor, they add up to frustrate me quite a bit, so this video kind of validates those feelings lol.

supercyclone
Автор

Thanks for the video Chuck. I'm starting a new position at work and have a flexible manager willing to put me on teams that either work with java or C#. I don't have much industry experience or experience with those languges outside of a few projects. This video helped me understand things differently and has me leaning towards joining the C# developers more than I already was. Thanks again

adhamabdelwahab
Автор

Thank God for the competition created by Java. Otherwise, there would not be such a shining and powerfull language called c#. For more than 20 years I have been coming across such comparisons. In the beginning, it was "c vs java". C# takes features from java (vm, open-source philosophy), java takes features from kotlin (records), c# (lambdas, virtual-threads), javascript (promises, declarative programming, reactive)(and golang latest version supports generics at last). The thing you have chosen is not only the language itself, it 's also the open-source community behind the scenes. Long live open-source, even the companies have been funding foundations to drive the open-source community.

ozgurugur
Автор

This is one of the best comparison videos i have ever come across. it cleared up lots of my doubts. Thank You

mjtm
Автор

In 2008, I got the option to choose either PHP or Dotnet for my career path. But, now I am proudly saying that it was the best decision of my life forever. My current goal is to bag a C# Web Application Developer job in the USA, and I hope very soon will succeed.

saarcfashion
Автор

Generics not accepting primitive types was one of the things I was shocked by when I started using Java.

IvanRandomDude
Автор

String-variable Interpolation is a nice syntax feature in C#

yogibarista
Автор

4:55 C# dynamic is not a tuple. its a proper dynamic type, like a dynamic type in java script.

thePrzemko
Автор

you forget about async-await. one of the most important think that java doesn't have till now and c# was one of the first languages to introduce async-await.

zhh
Автор

C# is pure comfort, compared to Java...
And also MS Visual Studio is the ultimate best editor by far!
I really wouldn't want to use anything else ever again.

saintinel
Автор

I believe in C# supremacy ! It feels more modern and Microsoft is upgrading it a lot since NET5 open-source. Anyway, I'll always respect Java and we'll still see it around for a while, but working with C# and Typescript for frontend (also Microsoft) is a great combination!

Lucas-moko
Автор

Wow, nice video..!! Best comparison I ever saw.. Thank you for such a great content..

ramprasanthudhayabaskar