+ 26
C++ or java
I have been looking at the features of both but I want to hear your reasons why I should pick one
68 Answers
+ 31
For me, both languages have very strong points in different areas:
C++ is very powerful, you can do practically anything with the language, and it's very used in the industry of programming.
The strength of Java is its universality. Anything can run Java, and it's not necessary to "port" the code. If the program can run in PC, it can run in any device.
Not because of this, one language is "better" than other. The best thing you can do is learning and trying by yourself both worlds, later, you can pick up the language that best suits you or you like the most.
+ 17
may be this link will help you https://www.educba.com/c-plus-plus-vs-java/
+ 14
this is common question i’ve already heard about it, but learning C++ before java means you have to excersice before going to gym
+ 14
Java
+ 10
java
+ 9
You must not compare the languages because both have their own benifts.
If you do so you have to compare Java and c#. Because c# is latest in c languages.
If you still compare c++ and Java then following are the reasons to choose Java :
1)Memory management is good in Java since it has Garbage Collection and disposable function, In c++ you have to implicitly do this.
2)Java is platform independent.
3)other reasons are common and known to all.
For hardware communication
c++ is good.
For web development Java is good.
+ 9
c++
+ 9
this one will help you 👇👇
https://www.javatpoint.com/cpp-vs-java
+ 9
Programming languages are not religion. Professionals choose language depending on the circumstances, don't depend only one of them. In IT world nothing is ideal bro.
+ 7
I vote for java
Reason: I like it
But keep in mind cpp is also a powerful language.
+ 7
c++
+ 7
C++
+ 6
c++ is more powerful than java. it can do anything java can and cannot do. but java is better at implementing certain tasks and a little easy compared to c++.
+ 6
C++ first then Java, as C++ will be easier to learn, after it, learn java. Why? Java has many function, as it's a bit longer to write so it may confuse you.
+ 5
c++ has influenced most programming languages including java, javascript and python. it is quite low level so it gives you better control of memory which can improve performance. it is designed for embedded devices and for high performance for apps such as game engines and desktop applications. cpp is one of the most difficult languages to master, so if you learn this it is easier to pick up other languages quickly
java runs well on mobile devices such as tablets and phones. unlike cpp it has garbage collection and so is easier to learn. however some have argued that kotlin will replace it if it gains traction. however (source and others) argued that if you should learn java before kotlin because both will share a similar community. at present java has a big community wheras kotlin’s community is still in its infancy.
my suggestion is if you are interested in low level memory management choose cpp, knowing this language will help you learn others easily
but if you want to see quicker results choose java as you can make things quicker as code is shorter
+ 5
If you need to ask, then Java.
C++ gives you power to be great or terrible. You can optimise memory usage till the heat death of the universe but you can also miss a simple cleanup and cause some crazy bugs.
Java puts the power of optimisation into the VM, which gets faster all the time using your same old code (matching and even beating C++ in many areas).
Some clarifications based on others comments:
- Neither Java or C++ are pure Object Oriented
- Kotlin is not replacing Java
- C++ is NOT "more powerful" than Java, just gives you more control
Essentially if you want to learn all the concepts that modern languages are based on or need to squeeze performance out on a specific system, C++ is the correct choice. If you want to just get programming, it's Java. Like I said, if you need to ask, you're probably the latter.
+ 4
Both of the languages have great qualities. I prefer C++ in most of my robotics programming.
+ 4
C++ if you want to go more into game-developing(its used alot often). Java if you want to do more desktop/application programming(its not as great at games).
+ 4
I heard that Java is better than c++ to learn .
+ 4
I thought java easier than c++
and as for me, you have more prospects in future : web dev(back end), game dev (android/ios), some other software. Also, java more interesting and more safe, as for me.
And finally, you can't get deep OOP knowledge (basic for big amount of languages) learning c++, but with java it's possible.
My vote for java.