![](https://codelido.com/assets/files/2022-12-14/1670991344-233075-image-blog-revel-top-java-tools.jpg)
What happens at compile time?-:
At compile time, the Java file is compiled by Java Compiler (It does not interact with OS) and converts the Java code into bytecode.
![](https://static.javatpoint.com/images/core/javacodecompile.png)
What happens at runtime?
At runtime, the following steps are performed:
![](https://static.javatpoint.com/images/java-runtime-processing.png)
Classloader: It is the subsystem of JVM that is used to load class files.
Bytecode Verifier: Checks the code fragments for illegal code that can violate access rights to objects.
Interpreter: Read bytecode stream then execute the instructions.
Q) Can you save a Java source file by another name than the class name?
Yes, if the class is not public. It is explained in the figure given below:
![](https://static.javatpoint.com/images/another.JPG)
o compile:
javac Hard.java
To execute:
java Simple
Observe that, we have compiled the code with file name but running the program with class name. Therefore, we can save a Java program other than class name.
Q) Can you have multiple classes in a java source file?
Yes, like the figure given below illustrates:
![](https://static.javatpoint.com/images/core/d.png)