+ 1

Which is better java or c++?

9th Sep 2016, 5:27 PM
Akash Roy
8 Answers
+ 4
C++ doesn't use a garbage collector, which has advantages and disadvantages. On one hand, you need to track memory allocations yourself and remember freeing unused data. On the other hand, performance is predictable, and your application won't freeze for several seconds because the Java VM decided thay now is the right time to free some memory, just as your java-controlled drone is descending quickly towards the ground. Another major difference is that Java compiles the code to a virtual machine, while C++ compiled to a true machine code. Other than the portability advantage of Java that was already mentioned above, the use of a VM carries with it some performance penalty. However, as the Java technology gets better with JIT (just in time) technology that recompiles your Java byte code to machine language at runtime, java runtime speed approaches that of C++ and in some circumstances may even surpass it, esp. when runtime data can cause code optimizations by the VM, not possible in C++ due to the use of a static compiler.
20th Nov 2016, 8:49 AM
Udi Finkelstein
Udi Finkelstein - avatar
+ 2
There is no better one... Both have adventages and disadventages. For beginners it makes no difference, so basically if you learn C++ you can code in Java without bigger problems.
9th Sep 2016, 6:52 PM
Nenad__
Nenad__ - avatar
+ 1
c++ is better where you want more performance,like all big companies uses c++ code for their servers when they require heavy computation and java is best when it comes to platform independence is required
11th Sep 2016, 5:18 AM
Akshay Naik
Akshay Naik - avatar
+ 1
it really depends on the task that is asked from you. if you have the time, take that opportunity and learn both, it will make you that much stronger.
19th Nov 2016, 3:50 PM
Mohamad Bo-Hamad
Mohamad Bo-Hamad - avatar
0
both need
10th Sep 2016, 2:35 PM
Ismam Khan
0
It May depend on your idea of "better". Also, what you plan to do with them. One wouldn't want to use a screw driver for a nail.
20th Nov 2016, 4:12 PM
Tor Sorensen
Tor Sorensen - avatar
- 1
well, i havent started C++ yet, nor do I think I will be learning it anytime soon. I'm saying Javascript, because I'm learning both that, and php at the moment, since I'm new to the codeing community.
20th Nov 2016, 4:47 AM
not414
- 2
I dont know any c++ but i think java script
9th Sep 2016, 8:59 PM
Evan Ramirez
Evan Ramirez - avatar