1/49
50 vocabulary flashcards covering core Java concepts from the notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Programming
Writing instructions (code) that tell a computer how to perform tasks, automate decisions, and manipulate data; transforms input into output using logic, data structures, and control flow.
JVM
Java Virtual Machine; executes compiled Java bytecode and provides platform independence.
JRE
Java Runtime Environment; the JVM plus standard libraries required to run Java programs.
JDK
Java Development Kit; JRE plus development tools (javac, jar, debugger) needed to compile and build Java programs.
Write Once, Run Anywhere (WORA)
Java source is compiled to bytecode that runs on any OS with a JVM, enabling cross-platform deployment.
Platform independence
The ability of Java programs to run on different hardware/OS via the JVM, reducing platform-specific rewrites.
Public class
A class declared public whose name must match the filename (case-sensitive).
Class-name filename rule
A public class name must exactly match the .java filename (e.g., HelloWorld -> HelloWorld.java).
Primitive types
Basic value types (byte, short, int, long, float, double, char, boolean) that store raw values.
Reference types
Types that hold references to objects (e.g., String, arrays, custom classes); variables store addresses.
byte
An 8-bit integer primitive type.
short
A 16-bit integer primitive type.
int
A 32-bit integer primitive type.
long
A 64-bit integer primitive type.
float
A 32-bit floating-point primitive type.
double
A 64-bit floating-point primitive type.
char
A single 16-bit Unicode character.
boolean
A primitive type representing true/false states.
String
A sequence of characters; a reference type used for text.
BigDecimal
A class used for exact decimal numbers (currency) to avoid rounding errors with floating types.
Variable
A named storage location in memory whose value can change.
Identifier
The name used for a variable, method, or class; must follow naming rules.
Initialization
Assigning a value to a variable before use (required for local variables).
Default values
Predefined values for instance/static variables: numeric → 0, boolean → false, references → null.
final
A modifier that prevents reassignment; used to create constants.
Constant
A fixed value defined by a final variable.
Arithmetic operators
Operators +, -, *, /, % used for mathematical computations.
Relational operators
Operators ==, !=,
Logical operators
Operators &&, ||, ! used for boolean logic.
Assignment operators
Operators like =, +=, -= used to assign or update variable values.
String concatenation
Using the + operator to join strings and other values into one String.
Operator precedence
Rules determining the order of evaluation; e.g., */ before +-; can be overridden with parentheses.
Associativity
Direction of evaluation for operators with the same precedence (left-to-right in Java).
Expression
A combination of variables, literals, operators, and method calls that yields a value.
if statement
A conditional that executes its block when its Boolean expression is true.
if-else
Branching structure that selects between two blocks depending on a condition.
else if
Chains of mutually exclusive conditions; only the first true branch runs.
braces
Curly braces {} used to group statements and define scope; important for blocks.
Nested if
An if statement inside another if to form more complex decisions.
String equals
Use s1.equals(s2) to compare text content rather than == which compares references.
System.out.print
Outputs text without a newline.
System.out.println
Outputs text with a trailing newline.
Scanner
A class used to read input; commonly Scanner sc = new Scanner(System.in).
nextLine
Scanner method that reads an entire line of input.
close
Close a resource (e.g., Scanner) to release underlying streams.
Runtime error
An error occurring during program execution (e.g., NullPointerException).
Compilation error
An error that prevents code from compiling (syntax issues like missing semicolon).
Logical error
A bug where the program runs but yields incorrect results.
break
Exits the nearest loop immediately.
for loop
Loop with initialization, condition, update; best when the count is known.