C++ or Java

Java is one of the best and most widely used programming languages for OOP.
 
I'm not a fan of either.
It depends on what you're planning on using it for.
C++ is more powerful, but java is easier to learn and use.
 
C++ is used more in large-scale development, like for banks or governments, whereas Java creates more consumer products like apps, software, and video games
It is absolutely the opposite.
Java is used heavily in enterprise (banks, gov infrastructure, business systems), mostly because the whole community is stuck in the tech stack they've been using for decades, and it's barely possible to migrate to newer languages or technologies. And it will continue to be like that for decades.
Good crossplatform language btw, the frameworks used in Java are pretty stable and allow to develop things quite quickly and reliably - that's why it was picked in the first place.

C++, on the other hand, is an absolute nightmare when you want to do some simple tasks like build a web server, or create a GUI app for your clients. Though, it shines when it comes to memory management, small size executables and fast forking code.
That's why graphics/network drivers (small size, very low level), video games (effecient resource usage) and apps like Google Chrome (the fastest javascript engine) are built using it.

But when it comes to apps - usually easy to build, easy to maintain - we just pick a modern framework and language that allow for the quickest possible development. JS + React for Web. Kotlin for Android. C#, Java/Kotlin, JS + Electron for Desktop.

If OP wants to learn OOP, he goes for Java 24/7 everyday of the week - the easiest path to get used to abstractions and programming concepts.
 
Learn Java now, then C++ later. Especially if you going to be self-taught. C++ and C have manual mem management, which you should understand at some point, however, in the beginning, it can slow down your learning.

Java as a first language does a good job of being low-level enough to understand programming without there being too much "magic" like you see in python, ruby, etc.

It is also high level enough to not get bogged down by memory management which is usually a solved issue in many programming languages through the use of automated mem management mechanisms like garbage collection and automatic reference counting.

Plus Java lets you write applications for pretty much all layers in the stack.

With the very popular Spring framework you can create backends in a way that you will have good documentation and support online.

You can use Spring Boot + JDBC to do backend + db programming. Also if you want to do server side rendering of your HTML, you can use Spring's Thymeleaf templating system as well.

You can do this in C++ as well, but it is way more low level.
 
Don't forget C++ is essential if you want to work with an unreal engine game and get paid some decent bucks if you can get a job developing with it. Thats why I'm going back to c++, hopefully 2024.
 
Don't forget C++ is essential if you want to work with an unreal engine game and get paid some decent bucks if you can get a job developing with it. Thats why I'm going back to c++, hopefully 2024.
I want to relearn C++ for this reason as well.
 
if you can get a job developing with it
That's the toughest one. I don't believe you can safely land a job in game dev in 2023, the market situation and inflation, considering that game developers are the most vulnerable in these conditions, makes me think these guys will have a hard time in the upcoming years
 
I am trying to learn oop language. Which one to choose C++ or Java?

C for procedural programming. C++ for OOP. When you learn C++, principles, methodology, logic, objects, classes, derivatives, inherences... you can very easily switch to any other programming language.
 
I don't like both options, and if you are a learner, I won't begin with them personally.

Learn JavaScript and you will never regret it!
 
What project are you thinking of? Choose the language that will help you achieve your goal.
 
C++ if you want to work in the bank industry.
 
If I were you I would start with Java, it's easier than C++, has a lot of predefined methods and the demand for java developers is greater than that for c++.
 
It depends on what you need it for. There are certainly more Java positions open. If you are looking to quickly find a job and earn money, then definitely java. If you are a student or want to learn as much as possible about programming and Computer Science, then procedural C and after that C++.
 
Back
Top