# Important Questions

### What is bytecode ?

Every Java program is first compiled into an intermediate language called Java bytecode. Java applications must be capable of executing on a variety of hardware architectures and operating systems. To accommodate this, the Java Compiler (javac) generates bytecodes-- *an architecture neutral intermediate format designed to transport code efficiently to multiple hardware and software platforms*.

### What is difference between Assembly Code and ByteCode ?

Assembly code means the human readable form of a machine code. Byte code on the other hand is normaly a language that can be interpreted by a byte code interpreter -- so it is not the processors native language.

### What is JVM and do we have different JVM for different environment ?

A Java virtual machine (JVM) is an **abstract** computing machine that enables a computer to run a Java program. There are three notions of the JVM: specification, implementation, and instance.

* The specification is a document that formally describes what is required of a JVM implementation. Having a single specification ensures all implementations are interoperable.
* A JVM implementation is a computer program that meets the requirements of the JVM specification.
* An instance of a JVM is an implementation running in a process that executes a computer program compiled into Java bytecode.

JVM is not platform independent, thats why you have different JVM for different operating systems.

The JVM is used primarily for 2 things:

* Translate the bytecode into the machine language for a particular computer
* Actually execute the corresponding machine-language instructions as well.

The JVM and bytecode combined give Java its status as a "portable" language – this is because Java bytecode can be transferred from one machine to another.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.gomchik.com/tech/java/assembly-code-vs-bytecode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
