Question: is java slower than c++?
Answer: Java code can be slower than C++ code--sometimes by a factor much larger than 2 or 3. Java code can also be competitive with C++ code--but often requires substantially more memory to do so. ... That said, yes, on average code written in Java will run slower than (roughly) equivalent code written in C++.