top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which is preferable JAVA or C/C++?

0 votes
671 views
Which is preferable JAVA or C/C++?
posted Jul 7, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Depends on the context, what is the context here?
When to choose JAVA over C/C++? and Viceversa

1 Answer

+1 vote
 
Best answer

Java is a platform independent so when you need to deliver a binary which may need to be run on different platform you may choose Java. On the other hand C++ provides higher performance as it is more close to assembly as compare to Java and in this case you may choose C++.

answer Jul 7, 2017 by Salil Agrawal
Does this means that, If i have compiled JAVA code in 32 bit Linux system then I can use that binary on 64 bit Windows?
When you say Close to assembly, What does it means?
C/C++ make calls to "System call" and does some operation, Like wise Java is also calling "System call" and does the operation, Correct? Then what does this close to assembly means?
Java compilation gives you bytecode which you run on the target using JVM. So in short bytecode remains same for all platform hence bytecode generated on Linux can be executed on Windows without any issue.
C/C++ Programming Supports Inline Assembly Language Programs. Using inline assembly language feature in C/C++  we can directly access system registers. C/C++ Programming is used to access memory directly using pointer.
...