Java's Magic: Bytecode

The most powerful feature of java is platform independent.Platform independent is COMPILE ONCE, RUN ANYWHERE. It means you can compile your source code on one platform and run on any platform. The magic behind this feature is Bytecode.

When you compile your code using javac command, compiler doesn't generate machine/platform specific code. It generates .class file. This .class file bytecode. You can run this .class file on any platform.

Comments

Popular posts from this blog

Data types and Literals in Java

How to define Auxiliary Constructor in case class in Scala

Dependency Injection in Spring framework