1/110
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
platform independence
"Java's ability to run on any operating system without modification because programs run on the JVM rather than directly on hardware. Example: The same .class file runs on Windows, Mac, and Linux."
Java Virtual Machine (JVM)
"The software that executes Java bytecode. It provides platform independence by translating bytecode into machine-specific instructions."
Java Development Kit (JDK)
"The complete package for developing Java programs, including the compiler (javac), debugger, and JRE."
Java Runtime Environment (JRE)
"Contains only what's needed to run Java programs (JVM + libraries), but not to compile them."
bytecode
"The intermediate compiled code (.class files) that the JVM executes. It's not human-readable and not machine code—it sits in between."
javac
"_______ HelloWorld.java compiles a Java source file into bytecode"
java
"_______ HelloWorld runs a compiled Java program from the command line"
main
"public static void _______(String[] args) - the method signature for a program's entry point"
class
"A blueprint that defines the data (fields) and behavior (methods) for objects. Example: A Car class defines that all cars have a color and can accelerate()."
object
"An instance of a class with its own copy of instance variables. Example: myCar and yourCar are two separate objects of the Car class."
encapsulation
"OOP principle of bundling data with the methods that operate on it while restricting direct access. Example: A BankAccount class keeps balance private and only allows changes through deposit() and withdraw()."
inheritance
"OOP principle where a class acquires fields and methods from a parent class using extends. Example: class Dog extends Animal means Dog inherits all of Animal's non-private members."
polymorphism
"OOP principle allowing objects of different classes to be treated through a common interface. Example: Animal[] pets can hold Dog and Cat objects, and pets[i].speak() runs each animal's specific implementation."
camelCase
"Naming convention for variables and methods: first word lowercase, subsequent words capitalized. Example: firstName, calculateTotalPrice"
//
"_______ This is a single-line comment"
/*
"_______ This is a multi-line comment that can span several lines */"
import
"_______ java.util.Scanner; makes the Scanner class available in your code"
java.lang package
"The default package automatically available in every Java program without an import statement. Contains String, Math, System, Integer, and Object."
int
"_______ count = 42; declares a 32-bit integer variable"
double
"_______ price = 19.99; declares a 64-bit floating-point variable"
boolean
"_______ isGameOver = false; declares a variable that holds only true or false"
char
"_______ letter = 'A'; declares a variable that holds a single Unicode character (note the single quotes)"
float
"_______ temperature = 98.6f; declares a 32-bit floating-point variable (note the f suffix)"
primitive vs reference types
"Primitives (int, double, boolean, etc.) store actual values directly. Reference variables (String, arrays, objects) store memory addresses pointing to objects."
variable
"A named storage location in memory that holds a value of a declared type"
final
"_______ double TAX_RATE = 0.07; declares a constant that cannot be changed after initialization"
(int)
"double gpa = 3.7; int rounded = _______ gpa; casts the double to an integer (truncates to 3)"
String
"_______ greeting = ""Hello""; declares a reference variable for a sequence of characters"
wrapper class
"Object versions of primitive types (Integer, Double, Boolean, Character) that allow primitives to be used where objects are required, such as in ArrayLists."
autoboxing
"Automatic conversion between primitives and their wrapper classes. Example: Integer num = 5; automatically wraps the int 5 in an Integer object."
Integer.parseInt
"int age = _______(""25""); converts a String to a primitive int"
%
"int remainder = 17 _______ 5; the modulus operator returns 2 (the remainder of division)"
++
"count_______; increments count by 1 (post-increment)"
--
"count_______; decrements count by 1 (post-decrement)"
+=
"total _______ 10; adds 10 to total and stores the result back in total"
operator precedence
"The order Java evaluates operators: parentheses first, then , /, % before +, -. Example: 2 + 3 4 equals 14, not 20."
==
"Equality operator that compares primitive values directly, but compares memory addresses (not content) for objects. Use .equals() to compare object content."
equals
"if (str1._______(str2)) compares the actual content of two Strings or objects"
&&
"if (age >= 18 _______ hasID) - logical AND returns true only when BOTH conditions are true"
||
"if (isStudent _______ isSenior) - logical OR returns true when AT LEAST ONE condition is true"
?:
"int max = (a > b) _______ a : b; the ternary operator returns a if condition is true, b otherwise"
length()
"int size = name._______; returns the number of characters in a String (note: method with parentheses)"
charAt
"char first = name._______(0); returns the character at the specified index"
substring
"String part = name._______(0, 4); extracts characters from index 0 up to but not including index 4"
indexOf
"int pos = name._______(""a""); returns the index of first occurrence, or -1 if not found"
compareTo
"int result = str1._______(str2); returns negative if str1 < str2, zero if equal, positive if str1 > str2 (alphabetically)"
immutability
"A property of Strings meaning they cannot be modified after creation. Methods like toUpperCase() return a NEW String rather than changing the original."
\n
"System.out.print(""Hello_______World""); prints Hello and World on separate lines (newline escape sequence)"
printf
"System.out._______(""Score: %d"", points); formats and prints output using format specifiers"
%d
"System.out.printf(""Count: _______"", num); format specifier for integers in printf"
Math.random()
"double rand = _______; returns a random double from 0.0 (inclusive) to 1.0 (exclusive)"
Math.pow
"double result = _______(2, 8); returns 2 raised to the 8th power (256.0)"
Math.sqrt
"double root = _______(144); returns the square root (12.0)"
nextInt
"Random rand = new Random(); int die = rand._______(6) + 1; generates random int from 1 to 6"
if
"_______ (score >= 90) { grade = 'A'; } executes the block only when condition is true"
else
"if (x > 0) { } _______ { } executes the second block when the if condition is false"
switch
"_______ (dayNum) { case 1: ... } selects code to execute based on a value"
case
"switch (grade) { _______ 'A': System.out.println(""Excellent""); break; } - a label matching a possible value"
default
"switch (x) { case 1: ... _______: ... } executes when no case matches"
for
"_______ (int i = 0; i < 10; i++) { } repeats code with initialization, condition, and update in one line"
:
"for (String name _______ names) { } the enhanced for loop iterates through each element of a collection"
while
"_______ (guess != answer) { } repeats code as long as the condition remains true"
do-while loop
"A loop that executes the body at least once before checking the condition. Syntax: do { code } while (condition);"
break
"The _______ statement immediately exits the current loop or switch block"
continue
"The _______ statement skips the rest of the current iteration and jumps to the next iteration"
syntax error
"A code structure mistake caught by the compiler. Example: missing semicolon, mismatched braces, misspelled keyword."
logic error
"Code that compiles and runs but produces incorrect results. Example: using < instead of <= causing an off-by-one error."
try
"_______ { riskyCode(); } wraps code that might throw an exception"
catch
"try { } _______ (Exception e) { } handles a specific type of exception when it occurs"
NullPointerException
"Thrown when you try to use a reference variable that points to null. Example: calling str.length() when str is null."
ArrayIndexOutOfBoundsException
"Thrown when accessing an invalid array index. Example: accessing arr[5] when the array only has 5 elements (indices 0-4)."
new int[5]
"int[] scores = _______; creates an array that can hold 5 integers (indices 0-4)"
"{10
20, 30}","int[] nums = _______; declares and initializes an array with three values using an initializer list"
.length
"int size = myArray_______; returns the number of elements in an array (note: property without parentheses)"
new int[3][4]
"int[][] grid = _______; creates a 2D array with 3 rows and 4 columns"
fixed vs dynamic size
"Arrays have a fixed size set at creation and can hold primitives. ArrayLists resize dynamically but can only hold objects (Integer, not int)."
new ArrayList
"ArrayList
add
"names._______(""Alice""); appends an element to the end of an ArrayList"
get
"String first = names._______(0); retrieves the element at the specified index"
size()
"int count = names._______; returns the number of elements in an ArrayList (note: method with parentheses)"
constructor
"A special method with the same name as the class that initializes new objects. Called automatically when you use the new keyword."
this
"_______.name = name; refers to the current object's instance variable, distinguishing it from a parameter with the same name"
private
"_______ String password; restricts access so only code within the same class can access this field"
public
"_______ void displayInfo() { } allows this method to be called from any other class"
method overloading
"Defining multiple methods with the same name but different parameter lists. Example: print(int x) and print(String s) can coexist in the same class."
accessor method
"A getter that returns a private field's value without allowing direct modification. Example: public String getName() { return name; }"
mutator method
"A setter that allows controlled modification of a private field. Example: public void setName(String n) { name = n; }"
static
"A _______ method or variable belongs to the class itself rather than to instances. Called using ClassName.methodName()."
return
"public int getAge() { _______ age; } exits the method and sends back a value to the caller"
lambda expression
"A concise way to represent an anonymous function. Syntax: (parameters) -> expression. Example: (x, y) -> x + y"
->
"(x, y) _______ x + y; the arrow operator separates parameters from the body in a lambda expression"
functional interface
"An interface with exactly one abstract method, making it eligible for lambda expressions. Example: Runnable, Comparator, ActionListener."
stream
"A sequence of elements that supports aggregate operations like filter, map, and reduce. Created from collections using .stream()."
filter
"numbers.stream()._______.(n -> n > 0) returns a stream containing only elements that match the predicate"
map
"names.stream()._______.(s -> s.toUpperCase()) transforms each element and returns a stream of the results"
collect
"stream._______.(Collectors.toList()) converts a stream back into a collection like a List"
JFrame
"The main window container in Swing. Example: _______ frame = new JFrame(""My App""); creates a top-level window."
JPanel
"A container component used to group and organize other components within a JFrame."
JButton
"_______ btn = new JButton(""Click Me""); creates a clickable button component"
JLabel
"_______ label = new JLabel(""Hello""); creates a component that displays text or an image"