+ 1
What are the similarities between c++ and Java?
3 odpowiedzi
+ 17
Truly speaking, there are a way too many similarities just because Java is actually derived from C++. Finiding similarities between two programming languages is not a difficult thing to do, maybe finding differences matter!
Now if I answer your question well, here's the comparison between these two, almost 47 points which makes sense :
http://www.javacoffeebreak.com/articles/thinkinginjava/comparingc++andjava.html
Something which inspires to learn c++ :
http://www.dickbaldwin.com/java/Java008.htm
+ 3
concepts same
variables functions oop
just some differences
if you know java when you learn
cpp you don't learn concepts again
else in both you must declare types etc
+ 3
Java is pure OOP (entry point is a method), C++ is multi-paradigm (entry point is still main()).
C++ supports multiple inheritance whereas Java doesn't (IIRC).
Java manages a lot for you and wipes your bum, C++ lets you shoot yourself in the foot.
Java (traditionally) compiles to java bytecode, C++ compiles to x86, ARM, AMD64, MIPS...blah.
C++ is more flexible and dangerous, Java is safer, stricter, and less flexible.
C++ is more general purpose, Java is specifically for relatively rapid app development.
It's a case of flexibility vs safety. I started Java years back but never really got into it. C++ I started, not wanting to learn it because I was a C purist, but already just the little I know has me wishing I'd started C++ years back. But really the syntax is C-alike in both cases. That's all I know as a student. A master could answer better.