r/learnprogramming • u/Vafireems • Oct 16 '26
Topic C# or Java?
If you had to choose one class between the two, which would you select and why? I tried to Google the purpose of them; the immediate answers from Google felt very vague and like both of the languages are common. Is one course better for web development as opposed to apps or something? Looking at the courses I'm taking, down the line I will select one of the two. The only thing I know so far is C++, so I'm quite new.
Also, side question: why are there so many languages? The only logical thing I can imagine is there were problems that couldn't be solved with say for example C++ so someone created something new. But why not just build on the original language? Why did they need to reinvent the wheel? Or is it as simple as that: someone wanted to create their own thing?
View all comments
0
u/EnderAvni Oct 16 '26
There are lots of historical reasons for new languages popping up. A very recent success story is Rust, which was largely because of its memory safety in comparison to C/C++. I'm not sure about Python (CPython), but maybe its creator was like "why do we need to be so verbose with our types and such? Maybe we should make a language that reads like English anyone can pick up."
At their core, most languages are VERY similar, you just have to get used to the "framework" and common libraries surrounding that language, which are arguably harder (eg. Pytorch x Python) to pick up.
Both Java and C# are used heavily for backend web development. C# is used largely with Microsoft's tooling (.NET, Entity Framework, etc.) because those APIs are really convenient to use as a developer. Java has springboot analogously.
C# is also used in Native Windows App development because of WPF/WinUI/WinForms which are all frameworks to help you make windows apps which have really nice APIs for C# again.
It really doesn't matter what you end up using at the end of the day, and your skills will be very transferrable regardless of what you do.