If you want your computer to run the way you want, you have to speak the language of God. Programmers refer to it as a programming language.
The thing our computer understands is 0 and 1's [Machine Code]. like 0101010101010... this may be some study material file stored somewhere.
We are not machines so we don't write or understand 0 and 1's, The thing we write is also known as source code [That human like us who are lazy and procrastinate a lot can understand ]. This Source code is only understood by other humans who know a programming language or a compiler[A tool that converts your[Source Code] to [Machine Code] ]
So, the java analogy is that we write a code once and it should work on all the devices.
For eg: I have some study material and my friend asking for it as he is a studious student. First, I will secure my study material and then share it with my friend, but if my friend wants to access it he should have a VLC media player installed.
The code we write in the java programming language is called java source code and the java compiler compiles it to byte code and if someone wants to access that code he should have installed JVM[Java Virtual Machine] in his device.
Connect with me:
Twitter: