Java and C++ are somewhat syntactically similarly languages that have diverged over time. Java was loosely inspired by C++, but initially didn’t adopt C++’s template structures, nor did it require C++’s header/content file separation, and of course, it used the JVM and compiled to bytecode rather than machine code.