C++ finds greater application in extensive development projects, such as those involving banks or governments, while Java predominantly caters to consumer-oriented products like applications, software, and video games.
It is the complete opposite. Java is widely employed in enterprise settings such as banks, government infrastructure, and business systems. This is largely due to the community being entrenched in the tech stack they've used for many years, making it incredibly challenging to transition to newer languages or technologies. This situation is expected to persist for decades. Java's strength lies in its excellent cross-platform compatibility, aided by stable frameworks that enable rapid and reliable development, which is why it was initially chosen.
On the other hand, C++ can be an absolute nightmare for simple tasks like building a web server or creating a GUI app for clients. However, it excels in areas such as memory management, generating small-sized executables, and executing fast forking code. This is why it's the preferred choice for graphics/network drivers (due to its small size and low-level capabilities), video games (thanks to its efficient resource usage), and applications like Google Chrome (which benefits from its high-speed JavaScript engine).
But when it comes to building apps that are easy to develop and maintain, we opt for modern frameworks and languages that facilitate the fastest possible development. For web applications, it's often JS + React, while Kotlin is favored for Android and C#, Java/Kotlin, JS + Electron for desktop applications.
If someone wishes to learn Object-Oriented Programming, they can rely on Java every day of the week. It offers the easiest path to become accustomed to abstractions and programming concepts.