Java vs. C

Why is Java slower than something like C or C++? And also, is the JNI slower than C (though it is mostly in C)?
C and C++ compile to native code. Java compiles to bytecode which, depending on implementation, may be ran through a virtual machine or compiled to native code JIT. Neither of these solutions are very efficient.
java talks with the java virtual machine, not with the OS directly..
Java is not as fast as C++ but it is highly platform portable. But because it must converse through the Java Runtime Environment some speed is lost.
[java] is highly platform portable
It runs only on one machine...
Java is unpredictable language.
Because garbage collector maybe going to run in not convenient time.
Java is unpredictable language.
Because garbage collector maybe going to run in not convenient time.
you can force it to do garbage collection in any time you wanted to.
Java is unpredictable language.
Me john, big tree!
Me john, big tree!
what?
Topic archived. No new replies allowed.