Click here to Skip to main content
15,848,349 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using an interpreter, all Java programs are compiled to an intermediate level called byte code.

If this is so, is it not that an interpreter executes the input line by line? And why is that the output is a byte code

1 solution

It is just reducing complex instructions into smaller simple instructions. The bytecode (just like assembly) is a solid fixed set of instructions. This means that you can create a bytecode compiler/interpreter that can execute newer java code without needing to change it. You can add extra functionality to the java core, and still be able to run it as normal because the output of bytecode is compatible with it. Just like new features are added to programming languages without the need to buy a new processor every time that happens. There are more advantages, but there is a lot on internet about it. So have a try with google.

Good luck!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900