Whenever you're ready, walk me through how you'd approach this.
What is the difference between C++ and Java? Compare their compilation and execution models, memory management, type systems, portability, and typical performance characteristics. Keep the answer focused on standard C++ and Java running on the JVM, and include one practical example showing how the same responsibility differs in each language.