Module 00 CPP Vs Java Intro Slides
Module 00 CPP Vs Java Intro Slides
computer.
Differences between C++ and Java
The Java Virtual Machine
“Bytecode”
Your Java Compiled
Java Compiler
Source Code Java (.class)
https://www.prepbytes.com/blog/java/java-compilation-process/
The C++
Executable
Your C++ Machine
C++ Compiler
Code code
Your Application
After compiling your code it becomes an executable (executable code)
program. This means that the machine’s hardware can Operating System
2
directly execute it.
https://subscription.packtpub.com/book/programming/9781789801491/1/ch01lvl1sec03/
the-c-compilation-model
Advantages and Disadvantages of Java
Advantages Disadvantages
• The JVM handles memory • Java can be slower than other
management and adds other complied languages.
projection to make programing • Due to its object-oriented
safer and more secure in some style, simple problems require
cases. class boilerplate code. This
• Programs written in Java are makes it a verbose language.
highly portable and can be run • Java runs on a virtual machine
on any machine with a JVM. which makes low level access
to the hardware more difficult.
Advantages and Disadvantages of C++
Advantages Disadvantages
• C++ is one of the most • C++ can be a complicated
performant and efficient language to learn due having
languages since its programs are multiple ways to do similar tasks
compiled into machine code. and similar syntax for different
• C++ allows low level control of task.
the hardware and memory • The programmer has complete
management. control and responsibility for
• It provides support for object- memory management. This often
oriented programming with little leads to bugs due to complexity
overhead. of memory management.