Basically, there is a case of choosing the right tool for the job. C / C ++ is a “lower level” than Java, and (everyone else is equal) should be used for lower level tasks.
C / C ++ is more suitable if you want to write code that is "close to metal" for maximum performance or interaction with equipment. Suitable for graphic games, developing an operating system, writing Linux / UNIX utilities, high-performance computing.
Java is more appropriate when you are more interested in development mobility, security, usability, and productivity. Suitable for business applications, prototypes, web applications and less intensive games.
I professionally encoded both. I am currently using Java because most of the things I develop are in the latter category. But I would use C / C ++ if I wanted to develop something in the previous category.
source share