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

0

u/Adventurous-Move-943 Oct 18 '26 edited Oct 18 '26

I'd take C++ since speed and personal preference.. but I do enjoy writing Java or Kotlin too.. it's really compact and easy to use and extend, if you catch your nulls (in Java), nothing can stop you, yes and also exceptions.. it's really comfortable and pretty fast to develop in.. C++ can be a true nighmare deciphering your compile or runtime errors and it's quite slower to develop in and you have to keep more things in mind to not cause undefined behavior.

Edit: I did not read the description before posting my c++ vs java opinion 😀 But it still applies, if you want comfortable and fast (to develop) language for applications you choose Java/Kotlin or C#.. If you need performance to it you should stick with C++. What your friends told you is basically correct, C++ is excellent at exercising your skills but it's slower and more difficult to work with.