What are the usage differences of C++ and Java? Can they both be used for all of the same things? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 5

What are the usage differences of C++ and Java? Can they both be used for all of the same things?

I've been learning C++ but I've heard that Java is more versatile, and I've also seen Java experience requested much more in job postings than C++. Should I be learning that instead?

10th Oct 2021, 4:34 PM
Shauna
Shauna - avatar
9 Antworten
+ 11
C++ has more speed but your code must be developed compatible to hardware and os system => more development resources will be needed. Java code is universal and works independed to os and hardware but is not for aplications where will be needed huge speed. Nowadays, different languages are used for different applications. But I would prefer to learn one first at a very good level and with a lot of practical projects. Java is one of the most used programming languages more than c++.
10th Oct 2021, 4:49 PM
JaScript
JaScript - avatar
+ 5
Thank you all for the resources! This helps a ton! I'll be taking a closer look at these so that I can get a better idea of what suits me best.
10th Oct 2021, 5:01 PM
Shauna
Shauna - avatar
+ 4
I see, that's why I see Java in a lot of job postings. Thank you!
10th Oct 2021, 4:53 PM
Shauna
Shauna - avatar
+ 4
Both are general purpose languages, so you can do a lot of things with either of them. Which one is the better choice for you depends on a lot of things, e.g. what exactly you want to do. You can find a ton of articles comparing the two. Here's some general advice on how to choose a programming language: https://code.sololearn.com/WWE2eu548roL/?ref=app
10th Oct 2021, 4:56 PM
Simon Sauter
Simon Sauter - avatar
+ 3
Paul of course there are more choices, but the question here was specific to the two languages.
10th Oct 2021, 8:37 PM
Simon Sauter
Simon Sauter - avatar
+ 1
Why not golang?
10th Oct 2021, 6:37 PM
Paul
Paul - avatar
+ 1
Paul why not use common sense before posting an irrelevant "answer"? Some things are just a mystery.
10th Oct 2021, 6:45 PM
Simon Sauter
Simon Sauter - avatar
+ 1
I think it is a good question Simon. Why choose one out of two when there are three to choose from.
10th Oct 2021, 8:30 PM
Paul
Paul - avatar
+ 1
JaScript I don't think java is more used language than c++ since some JVMs are written in c++. so basically a java code is using c++ code to run. C and C++ underlies nearly all modern software and programming languages today. Many programming languages such as Python and Ruby and others are just scripting languages, really, calling C and C++ libraries under the hood. C, C++ is like nuts and bolts for most of the software programs in existence today, and therefore are technically the most used languages.
12th Oct 2021, 6:38 AM
ACE
ACE - avatar