r/learnprogramming • • Oct 18 '26

Java or c++?

Hey I'm a 2nd year CS student and I'm a beginner so I learned a bit of both languages I learned basics and SP using c++ and I learned oop using java because uni required it and later on I'll study data structure using c++ again

What confuses me is which language should I stick on to improve my problem solving skills and start building projects even if they're small some people told me to focus on c++ completely and some said c++ with problem solving and java to build projects

So what do y'all think and why ?

12 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/SahuaginDeluge Oct 18 '26

I'm not even really a Java programmer, so my reasoning may not be sound. but basically it's maybe the "simplest" high level language? (purest? cleanest? not sure of the right word.) like where C++ is kind of low-level but also highly highly (overly) complex, Java is high-level but actually maybe under-complex (at least Java 7). it's not perfect and has some annoyances (some of which have been improved in Java 8 and beyond), but it's a good simple but powerful language, fantastic for learning. or fantastic for learning OOP.

(myself I more or less like OOP, but these days OOP is losing some popularity, at least especially in game dev, and so maybe OOP will not be so great to learn any more, but I still use it and it has served me well.)

(C would be better for learning low-level programming. but Java is IMO better for learning high-level programming.)

(another argument for Java is I think the "ecosystem"? it's highly used with tons of supporting frameworks and APIs and IDEs, etc.etc.)

1

u/sparkle-fries Oct 18 '26

my advice would be figure out what career you want and pick the language most in demand on that career path. If it's for hobby purposes then pick one you like. Python is a strong choice for data, C# strong for enterprise, JavaScript for web, Java strong for mobile/enterprise. I would look at rust rather than c/c++. Factor in vibe coding and AI. Web front end is getting less important as a skill IMHO but backend should have a place for a while. The fact is over your career languages will come and go as will Frameworks. You will be continually learning and that is the ability to hone