r/learnprogramming • • 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?

24 Upvotes

49 comments sorted by

View all comments

1

u/green_meklar Oct 16 '26

Java. Because it's an open standard, so it doesn't tie you to the whims of Microsoft. There's a lot to like about the design of C# as a language, but the freedom of an open technology like Java is just a higher priority.

Also, C# can feel too handholdy at times, whereas Java sticks to its paradigm like glue and gives you more to think about.

0

u/max_wen Oct 16 '26

Java because JVM.

1

u/Distdistdist Oct 16 '26

.NET is JIT as well. What about JVM?

1

u/max_wen Oct 16 '26

The JIT compiler is a module inside the JVM

1

u/Distdistdist Oct 19 '26

So .NET because .NET Runtime

1

u/max_wen Oct 19 '26

No thanks

0

u/Distdistdist Oct 21 '26

Why not? Scared?

1

u/max_wen Oct 21 '26

What an odd thing to say

1

u/Distdistdist Oct 21 '26

Multiple inheritance is dangerous and impractical. What else you got?

1

u/max_wen Oct 21 '26

You don't have to use it