1/62
A vocabulary set covering fundamental Java and OOP concepts from the lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Java
A high-level, object-oriented language released in 1996 by Sun Microsystems (now Oracle) designed for portability and automatic memory management.
JVM (Java Virtual Machine)
The interpreter that runs Java bytecode by translating it to machine code at runtime, enabling platform independence.
Bytecode
Platform-independent intermediate code (.class) produced by the Java compiler and executed by the JVM.
Compiler
Translates code from one language to another (e.g., Java source to bytecode); typically produces faster, pre-translated output.
Interpreter
Translates and runs code as it executes, often translating on the fly (e.g., Python).
javac
Java compiler command that compiles .java files into .class bytecode files.
public class
A class declaration that is accessible from other classes; usually in its own file named after the class.
public static void main(String[] args)
The program entry point; static so it can be run without an object; returns void and receives command line arguments.
System.out.println
Prints a line of text to the console, followed by a newline.
CamelCase
Naming convention with no spaces and each new word capitalized (e.g., HelloWorld).
.class
File extension for Java bytecode generated by the compiler.
.java
Source file extension; the public class name should match the file name.
class
Blueprint for creating objects; defines fields (state) and methods (behavior).
object
An instance of a class containing its own state and the operations that can be performed on it.
method
A function contained in a class that defines an operation its objects can perform.
field/variable
A member of a class that holds data (the object's state).
static
Modifier indicating a member belongs to the class rather than to any particular object.
final
Modifier to declare constants or prevent overriding, depending on context.
private
Access modifier restricting visibility to the declaring class.
public (modifier)
Access modifier that allows visibility from other classes.
scope
Region of a program where an identifier can be used; determined by braces and blocks.
primitive types
Built-in simple types: byte, short, int, long, float, double, char, boolean.
reference types
Types that refer to objects (e.g., String, arrays, classes); stored as object references.
1-D array
Fixed-size, indexable collection of elements of the same type; indices start at 0.
2-D array
Array of arrays (a matrix); can be rectangular or ragged.
String
Immutable class representing a sequence of characters.
String concatenation
Joining strings using + or the concat method to form a new string.
String immutability
Strings cannot be changed after creation; operations produce new String objects.
substring
Extracts a portion of a string; end index is exclusive.
Scanner
Class for obtaining input from sources like the keyboard (System.in).
printf
Print formatted text using format specifiers (e.g., %d, %f, %s).
String.format
Creates a formatted string without printing it; returns the formatted string.
NumberFormat
Formats numbers as currency, percentages, etc., with locale support.
DecimalFormat
Subclass of NumberFormat that formats numbers using custom patterns.
Locale
Represents a region for formatting rules
if statement
Conditional that executes code only when its boolean condition is true.
switch statement
Multi-branch conditional that selects a block based on an expression's value; uses break to avoid fall-through.
while loop
Loop that repeatedly executes as long as a condition remains true.
do-while loop
Loop that executes its body at least once, then repeats while condition is true.
for loop
Pre-test loop with initialization, condition, and update that repeats while the condition holds.
break
Exits the nearest enclosing loop or switch statement.
continue
Skips the current iteration and proceeds to the next loop iteration.
short-circuit evaluation
In && and ||, evaluation can stop early if the result is determined from the left side.
exception
An error that occurs during runtime; represented by the Throwable hierarchy.
try-catch-finally
Structure to handle exceptions: try executes risk code, catch handles specified exceptions, finally runs always.
throw
Operator to create and raise an exception object.
throws
Declaration that a method may throw certain checked exceptions.
File I/O
Input and output with files using classes like File, Scanner, and PrintWriter; may throw IOExceptions.
ArrayList
Resizable array implementation of List; grows automatically as elements are added.
LinkedList
List implemented as nodes linked together; supports efficient insertions/removals.
Generics
Parameterized types that allow code to be type-safe (e.g., ArrayList
Comparable
Interface for objects that have a natural ordering via compareTo.
compareTo
Method returning negative, zero, or positive to indicate ordering.
inheritance
Mechanism for a subclass to reuse the state and behavior of a superclass.
polymorphism
Ability to treat objects of different classes through a common interface or superclass.
interface
Contract declaring abstract methods that implementing classes must define.
implements
Keyword indicating a class implements an interface.
constructor
Special method to initialize a new object; has the same name as the class and no return type.
this
Reference to the current object inside an instance method or constructor.
toString
Method that returns a readable string representation of an object; often overridden.
encapsulation
Hiding internal object state and accessing it via public methods.
default constructor
No-argument constructor automatically provided if no other constructors are defined.
overloading
Defining multiple methods with the same name but different parameter lists.