Java vs C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java vs C++

hey guys, what language would you recommend for starters to learn first?

20th Nov 2016, 9:56 PM
jin kazama
jin kazama - avatar
4 Answers
+ 3
^ilia love it. Answer without arguments telling why you've chosen one over second. I will tell it in my words: Q: Why C++? A: You can manage whole memory of your program.It's Good for learning low level programming (and by low level I mean this is closer to computer language, so it's harder for us to understand). When you learn C++ rest languages will be easier to understand, since every of them has C based syntax. Q: So what are advanatges of Java? A: Java is most used language for Android programming. It has many (by many I mean REALLY ALOT) of build in liblaries/classes/utilities which are lacking in c++ (where you have to write it by yourself). Java is pure OO language, so it's better looking. The one thing I hate about Java is tool called Garbage collector, it's used to delete unused references, so you don't have to. Sounds nice, right? In practice your program is slowed and some references not deleted. Summary: Both languages are good, and it's good to know them both. After little tryout time just decide which you like the most and just master it.
20th Nov 2016, 10:52 PM
Jakub Stasiak
Jakub Stasiak - avatar
0
Java
20th Nov 2016, 10:00 PM
ilia lekishvili
ilia lekishvili - avatar
0
It doesn't matter as long as the tutorial is good and the one for c++ on sololearn is terible (outdated as it teaches a soon to be 20 years old version of the language). Most of c++ tutorials are in fact written as c with classes which is a terrible way to write c++ code. The only good c++ for beginners that I know of is from the author of the language (Bearne Stroustrup) who has a for beginners book on the topic (good c++ teaching guide should never start with pointers as they are rarely used in good production code). Java tutorial on this site is much better and java is a begginer language... In the end it depends on whay you need: hardvare and advanced things: c++ but not on this site random stuff - learn java web - you're better of learning php for server side and javascript for browser side prototyping and scripting - start with python Edit: forgot to mention that languages are mostly pretty similar when it comes to basics so for starters choose a language in the direction where you want to continue your work or flip a coin :) but the languages start to diverge when it comes to which techniqes you can use (I prefer c++ for different reasons but to point two out: RAII for compensating for my forgetfulness - google it up - and spanning from low level to high abstraction) so once you learn one language and then switch to another with similar syntax don't bash on the language before learning those cechnique differences. E.g. Java: SomeObj o = new SomeObj(); // gets cleaned up by garbage collector c++ direct mapping: SomeObj *o = new SomeObj(); // you have ti manually clean it up or you get a resource leak so people start to shout learn java as c++ is bad... c++ version: SomeObj o; // gets cleaned up by itself when it goes out of scope and it's even shorter and more efficient (not supported by java) So just learn the differences and don't be mislead by language fanboys shouting poor reasons without knowing their tools.
20th Nov 2016, 10:37 PM
Domen Vrankar
Domen Vrankar - avatar
- 3
c#
20th Nov 2016, 10:48 PM
Gerome Aboüt
Gerome Aboüt - avatar