What is Java Virtual Machine?

Recently, I was asking someone some terms/topics associated with Android and one of the things this person mentioned was the Java Virtual Machine.

I had not heard of this before so I Googled it and asked this person for an explanation. I had created virtual machines for Linux distributions like CentOS and Ubuntu, but Java's a programming language so I was confused.

I had not been exposed to C++ much before which is why I was confused. What I learned is that C++ code is different on each operating system which causes issues if you want to run the same program on different operating systems. On the other hand, for Java, they created the Java Virtual Machine (JVM) so Java programs are the same on all computers since they're running on the JVM.

Not only did I learn something about Java and C++, I also understand better how high level programming languages work.

Bonus Fact: Dalvik is a modification of the JVM so that it can run on the Android operating system.

Comments