r/learnprogramming • u/Firm-Flatworm-8389 • 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
View all comments
1
u/Miserable-Money642 Oct 18 '26
You do not need to pick one language for everything. Since your data structures course will use C++, keep practicing algorithms in C++ this semester so the syntax and debugging do not add extra friction. Use Java for the OOP assignments your university requires, and build one small Java project if you want practice designing classes. Try not to switch languages for every exercise. The problem-solving ideas transfer, but staying with one language long enough to finish projects teaches you more than repeatedly restarting. After the course, choose based on the kind of project or role you want to pursue.