Java is slow because a Java program is first converted into bytecode, which is platform-independent code. In C++, there is no such middle operation for converting the program into bytecode.