How does java provide platform independence?
Can you explain the exact process of what happens within the machine and on the level of binaries which we know as platform independence-one of the greatest boons of Java
Usually what happens in other programming language is source code gets compiled and compiler converts high-level language into machine level which is the executable code and is machine i.e. operating system specific. But in java compiler does not convert source code into executable code rather it converts into intermediate code known as bytecode which s non-executable code. Now, this bytecode needs the interpreter to get converted into executable code and this interpreter is known as Java Virtual Machine which is operating specific software.
For a more detailed explanation you can refer below-given link:
I agree with Shivangi Agrawal, it is a high level programming language but still when it is compiled, what I understand is it still reads machine language which were the ones and zeroes down to its very bottom. Just to summarize it all. That's why it can run on any system that reads machine language or machine code (example is bytecode). To summarize it again, there's a thing in java that is somehow or maybe the translator. I'm not sure what it is. But what I know is that it maybe the reason that a system can understand a java code or program. That is what I've understand. I hope you find it helpful. Thanks!
Shivangi has the precise answer! Thanks!