java Flashcards
We will go with some terminology
In Java when we write code, you will make a source code file which has .java extension, compile it using the javac compiler, and then run the compiled bytecode on a Java virtual machine.
After the Java code is compiled, the bytecode gets generated, which can be executed on any machine using JVM.
When you compile, java actually looks for syntax error so until you have the right syntax, the program will not run.
Bytecode is the .class file.
This is why Java is platform independent because you can run the bytecode in any Operating system.
JVM
acts as a run-time engine to run Java applications. JVM is the one that actually calls the main method present in a java code. JVM is a part of JRE(Java Runtime Environment).
We will go with some terminology
After the Java code is compiled, the bytecode gets generated, which can be executed on any machine using JVM
We will go with some terminology
In Java when we write code, you will make a source code file which has .java extension, compile it using the javac compiler, and then run the compiled bytecode on a Java virtual machine.
After the Java code is compiled, the bytecode gets generated, which can be executed on any machine using JVM
Bytecode is the .class file
This is why Java is platform independent because you can run the bytecode in any Operating system.
Be able to write the main method
The main() method is where your program starts running.
Without main method JVM
It has public keywords so that everyone can acess it.
This keyword denotes it is a class. This is the name of the class. The opening curly brace and the end braces are required.
Every satement need to end in the semicolon.