Welcome

Wednesday 11 September 2013

What is java bytecode?

In java, after compilation, the java compiler generates an intermediate non-human readable code. This code file is know as bytecode. The extension of bytecode file is .class.

The bytecode generated by the java compiler is platform independent i.e this code can be executed on a machine with any operating system or any hardware. The bytecode is generated in such a way that when it runs on any machine it gives the same output. This bytecode is executed by the JVM

Q: Why Java is called as portable language or platform independent?
A: Due to the bytecode generated by the java compiler.

Q: Is JVM platform independent?
A: No. It is platform dependent.


No comments:

Post a Comment