Quiz # 1 Flashcards
JVM – Java Virtual Machine (java.exe) does?
converts bytecode into machine code in real time.
Is contained in the JRE (Java Runtime Environment) along with the Java API (our library of free code like System.out.println())
Java API is?
A library of java code that we can use while writing our programs
JRE (Java Runtime Environment) is?
The JRE contains the JVM and the Java API
The JRE ships with virtually every computer operating system out there
Can be found in Android phones, gas station pumps, toasters, TVs, etc.
JDK (Java Development Kit) is?
Only programmers need the JDK.
Contains the compiler and JRE.
The JDK contains the Compiler (javac.exe)
Three core principles of Programming languages?
Sequence
Decision
Iteration
______ translates source code to bytecode
Compiler translates source code to bytecode
What is javac.exe
the compiler
______ converts bytecode to machine code
JVM(Java virtual machine)
_____ is the type of java code that programmers type into an editor like VSCode.
java source code
____ exist on many operating systems, thus allowing java programs to be cross-platform.
JVM
The first time a class is accessed, the JVM loads the bytecode from the .class file into the _____ area of memory.
The first time a class is accessed, the JVM loads the bytecode from the .class file into the method area of memory.
Break down the code:
public class Test{
public static void main(String[] arg){
int a = 100;
System.out.println(a);
}
}
[public class] = Class header
[Test{] = Class name
[public static void main
(String[] arg) ]= Method name
{
[int a = 100;] = Declare primitive variable
[System.out.println(a);] = Print to screen
}
}
Variables whose type starts with a lower-case letter (int, double, boolean, etc) are ________ variables
Variables whose type starts with a lower-case letter (int, double, boolean, etc) are PRIMITIVE variables
_____ variables are any variables of any type that are declared inside of a method’s code block. (any method, not just the main method)
______ variables are always stored in the current stack frame of the stack, while the program is running
Local variables are any variables of any type that are declared inside of a method’s code block. (any method, not just the main method)
Local variables are always stored in the current stack frame of the stack, while the program is running
The Stack is an organized area in memory where _____ ________ are created and destroyed.
Every time a method is ____, a new ______ _____ frame is created.
The Stack is an organized area in memory where stack frames are created and destroyed.
Every time a method is entered, a new current stack frame is created.