1/109
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Encapsulation
OOP principle of bundling data and methods together and hiding implementation details inside the object
switch break
Exits the switch immediately after executing a case; without it execution falls through into the next case
toString()
Every Java object has this method; returns the String representation; called automatically in concatenation or println
Array default values
0 for numeric types, false for boolean, null for reference types
Utility/helper method
Performs internal calculations or sub-tasks; typically declared private; hidden behind the public interface; not called directly by client code
Client-Server
Computing model where some processes make requests (clients) and some processes grant requests (servers)
JavaFX
Java's modern GUI framework; uses a scene graph — Stage (window) contains a Scene which contains UI nodes
Gradle
Build automation tool; manages dependencies, compiles code, runs tests, packages applications; uses a build.gradle file
java.io
Package providing classes for reading and writing data; includes FileWriter, PrintWriter, IOException, FileReader
Java EE
Enterprise edition of Java used for large-scale distributed/web applications
Polymorphism
OOP principle where objects of different classes can be treated uniformly through a shared interface
javac
The Java compiler; translates .java source files into .class bytecode files
Compiler
Translates entire source code to bytecode before execution (javac)
// comment
Single-line end-of-line comment; compiler ignores it
Declaring a variable
type variableName; OR type variableName = value;
public access modifier
Accessible from any class anywhere in the program
Pseudocode
An informal plain-language description of an algorithm; not real code; not compilable; bridges human thinking and code
Infinite loop
Occurs when the loop condition is omitted or never becomes false; loop never ends
Method overriding
A subclass provides its own implementation of a method from its superclass with the same signature; JVM decides at runtime which version to call (runtime polymorphism)
Cohesion
Degree to which a method/class focuses on a single well-defined task; HIGH cohesion is good
Coupling
Degree to which one class/method depends on another; LOW coupling is good
Array
A fixed-size group of variables of the same type stored at contiguous memory locations; objects in Java (reference types)
Array length
Stored in array.length; fixed at creation (final variable — cannot change)
Jagged array
A 2D array where rows can have different lengths
try block
Contains code that might throw an exception
Accessor / getter
Reads and returns the object's state without modifying it; named getXxx() or isXxx() for booleans
Fat client
Client machine does most of the processing; significant local software installed; less server load but harder to update
Syntax error
Violation of Java's grammar rules; detected at compile time — program won't compile
Logic error
Program compiles and runs but produces incorrect results; algorithm is flawed; caught through testing/debugging — compiler cannot catch these
Java SE
Standard edition of Java used for desktop/server applications
Method signature
A method's name combined with its parameter list (types and order); does NOT include return type
switch default case
Runs when no case label matches; optional but strongly recommended
break (loop)
Immediately exits the entire loop (or switch); execution continues after the loop
Fat server
Server handles most business logic and processing; clients are lightweight/thin
Java ME
Micro edition of Java used for resource-constrained devices like smartwatches
Class
A blueprint that defines attributes and behaviors for objects
Object
An instance of a class; has its own attributes (instance variables) and behaviors (methods)
Instance variable
Data that an object carries with it; declared inside a class but outside method bodies; each object has its own copy
Inheritance
OOP principle where a new class reuses characteristics of an existing class
Public interface
A collection of method declarations (no implementation by default) that a class agrees to implement; defines a contract other classes must follow
java (runtime)
The JVM executor; runs compiled .class bytecode files
Interpreter
Translates and executes bytecode one instruction at a time at runtime, enabling platform independence (JVM)
main method signature
public static void main(String[] args) — must be exact
/ / comment
Traditional multi-line comment; compiler ignores everything between the delimiters
/* / comment
Javadoc comment; used to generate HTML documentation via the javadoc utility
Outputs text; cursor stays on the same line
println
Outputs text and moves cursor to the next line
printf
Formatted output using format specifiers like %s (String), %d (integer), %f (float)
Scanner class
From java.util; reads input from a source (keyboard = System.in or a file); methods include nextLine(), next(), nextInt(), nextDouble()
java.lang package
The default Java package; automatically imported into every program; contains String, System, Math, Integer, Object
Constructor
A special method used to initialize a new object; same name as the class; no return type; called automatically with new
Default constructor
Provided automatically by the compiler only if you declare NO constructors; initializes fields to default values (0, false, null)
private access modifier
Accessible only within the class it is declared in; used for instance variables and helper methods
protected access modifier
Accessible from the same class, same package, and subclasses
Package-private (no modifier)
Accessible only by classes in the same package
Driver class
Contains the main() method; drives/runs the program; used for testing and launching
Helper class
Contains the actual logic, data, and behavior; does the real work; called upon by the driver
UML Class diagram
Visual showing a class's name (top), fields with types (middle), and methods with signatures (bottom); + = public, - = private, # = protected
Algorithm
A finite, unambiguous, effective step-by-step set of instructions that solves a problem; language-independent
final variable (constant)
Declared with keyword final; set once and cannot be changed; convention is ALL_CAPS_WITH_UNDERSCORES; attempting to modify causes a compile-time error
Sequence (control)
Execute statements one after another in the order they appear; the default flow
Selection (control)
Choose a path of execution based on a condition; Java has three selection statements (if, if-else, switch)
Iteration (control)
Repeat a block; Java has four iteration statements (for, while, do-while, enhanced for)
Switch limitation
Cannot test ranges; every discrete value needs its own case; use if-else for range checks like score >= 90
for loop syntax
for (initialization; loopContinuationCondition; increment) { body }
while loop
Condition tested BEFORE the body runs; body may never execute (0 or more times)
do...while loop
Condition tested AFTER the body runs; body always executes at least once
Counter-controlled iteration
You know in advance how many times to repeat; uses a counter with a known start, end, and increment
Sentinel-controlled iteration
Repeat until a special sentinel value signals the end; you don't know in advance how many iterations will occur
continue (loop)
Skips the rest of the current iteration and jumps to the next one; in for loops the increment still runs
Method overloading
Multiple methods in the same class share the same name but have different parameter lists; compiler selects the right version at compile time (compile-time polymorphism)
3 ways to call a method
(1) method name only (same class), (2) object reference + dot (instance method), (3) class name + dot (static method)
3 ways to return control
(1) end brace of void method, (2) return; with no value (void method), (3) return expression; (non-void method)
ArrayIndexOutOfBoundsException
Runtime exception thrown when accessing an out-of-bounds array index
Array initializer list
Skip new keyword; use comma-separated values in braces: int[] primes = {2, 3, 5, 7, 11};
2D array
An array of arrays — rows and columns like a spreadsheet; access with grid[row][col]; traverse with nested for loops
ArrayList vs Array — size
Array: fixed size set at creation. ArrayList: dynamic — grows/shrinks automatically
ArrayList vs Array — primitives
Array: can hold primitives OR objects. ArrayList: can only hold objects (use Integer, Double, etc.)
ArrayList vs Array — length/size
Array uses .length; ArrayList uses .size()
ArrayList vs Array — access
Array uses arr[i]; ArrayList uses list.get(i)
throw (exceptions)
A method detects an invalid condition, creates a new exception object, and throws it; immediately terminates the method
catch (exceptions)
A try-catch block catches a thrown exception so the program handles it gracefully instead of crashing
catch block
Immediately follows try; if an exception is thrown, execution jumps here; multiple catch blocks can follow one try
Mutator / setter
Modifies the object's state; named setXxx(); returns void; should validate the new value before storing
Database
A single repository of logically related data
Relational data model
Data structured as a collection of logically related tables; tables related through foreign keys; most widely used data model worldwide; supports 1:1 and 1:M relationships
Primary key (PK)
Unique identifier (one or more attributes) for each row in a table; enforces entity integrity
Foreign key (FK)
One or more attributes that create a relationship between tables; refers to the PK of the other table; data types must match; enforces referential integrity
DBMS
Database Management System — software (e.g., SQLite, MySQL, Oracle) that creates, manages, and interacts with the database
DBMS vs Database
Database = the actual stored data; DBMS = the software that manages it
CRUD
Create, Read (retrieve), Update, Delete — the four basic database operations
SQLite
Small, fast, self-contained SQL database engine; no separate server process needed; most popular embedded SQL database worldwide
Thin client
Client does minimal processing; most logic runs on the server; easy to maintain centrally but more server-dependent
Thin server
Server does minimal work (e.g., just stores/retrieves data); clients handle more processing
Runtime error
Program compiles but crashes during execution; detected when the program runs
Modal dialog box
Blocks all interaction with the application until the user dismisses it; user MUST respond before doing anything else
Modeless dialog box
Does NOT block other interactions; user can continue working while the dialog is open
SceneBuilder
Visual drag-and-drop tool for designing JavaFX UIs; generates FXML files
java.util.Scanner
Reads input from various sources; methods: nextInt(), nextDouble(), next(), nextLine(), hasNext()
java.io.FileWriter
Writes characters to a file; usually wrapped in PrintWriter