1/22
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
Java Compiler
Converts source code into machine code file, and runs everything at once

Java Interpreter
Converts machine code when program is run, goes LINE by LINE to understand what each line does. Debuggers are based on interpreters

Interpreter vs Compiler

Java Virtual Machine
loads up all bytecode from .class files and runs program

Scanner Syntax
import java.util.Scanner;
High level languages
java, python
low level languages
assembly, c
primitive data
data type that canot be manipulated (int, double, float, long, short, byte, boolean, char)
primitiveType name = data;
object data
String, Scanner (notice all uppercase)
ObjectType name = new ObjectType();
pass by values
a mechanism to pass everything in java
static methods
with static methods, objects are NOT created
syntax: className.methodName(); or className.variableName();
non-static
with non-static methods, objects ARE created
syntax: object.methodName();
a<<b
shifts to the left by b positions, filling with 0’s
a>>b
shifts to the right by b positions, filling with the sign bit.
bytecode
code executed by the JVM
syntax error
an error in the code that violates the grammatical rules of the programming language.
runtime error
an error that occurs during the execution of a program, leading to unexpected behavior.
Math random syntax
Math.random*((max-min) +1) + min;
Method overloading
when you have multiple methods of the same name but different parameters
Method overriding
Refers to inheritance, when same method has new implementation
Reference copy
Copy of object, both point to same object (same memory)
tail recursion
answer is returned at very last call
non tail recursion
answer is built up with each recursive call