Java glossary
237 Java terms, from Novice to Master. Start with the basics or jump to a level.
Updated
Novice
- .java File Extension
- The filename ending used for a Java source file.
- Arithmetic Operators
- Symbols such as +, -, *, /, and % that perform calculations.
- Assignment
- Storing a value in a variable with the = operator.
- Block Comment
- A comment enclosed by /* and */ that can cover several lines.
- boolean
- A primitive type whose only values are true and false.
- char
- A primitive type that stores one UTF-16 code unit.
- Class
- A blueprint that describes the data and behavior of objects.
- Comment
- Text for people reading the code that the compiler ignores.
- Comparison Operators
- Operators that compare two values and produce true or false.
- Compilation
- The step that checks Java source code and converts it into bytecode.
- Compile Error
- A problem that prevents Java source code from being compiled.
- Compiler (javac)
- The JDK tool that turns Java source code into bytecode.
- Curly Braces
- The { and } characters that surround a class, method, or other block.
- Data Type
- A rule describing what kind of value something can hold and what operations it supports.
- Declaration
- A statement that introduces a variable, method, class, or other named item.
- double
- A primitive type for numbers that can include a fractional part.
- else if Statement
- An additional condition tested when earlier if conditions were false.
- if Statement
- A statement that runs code only when its condition is true.
- Increment Operator
- The ++ operator, which adds one to a numeric variable.
- Initialization
- Giving a variable its first value when it is created.
- int
- A primitive type for whole numbers within a fixed range.
- Java
- A widely used programming language that runs on many kinds of computers through the Java Virtual Machine.
- Java Development Kit (JDK)
- The tools needed to write, compile, and run Java programs.
- Java Runtime Environment (JRE)
- The software needed to run Java programs, including the JVM and standard libraries.
- Java Virtual Machine (JVM)
- The engine that runs compiled Java bytecode on a particular computer.
- Javadoc Comment
- A structured comment used to generate documentation for Java code.
- Literal
- A value written directly in source code, such as 42, true, or "hello".
- Logical Operators
- Operators that combine or reverse boolean conditions.
- main Method
- The usual starting point of a Java application.
- Method
- A named block of code that performs an action and can return a value.
- Narrowing Conversion
- An explicit numeric conversion that may lose range or precision.
- Primitive Type
- One of Java's basic value types, such as int, double, char, or boolean.
- Runtime Error
- A problem that occurs while a compiled program is running.
- Semicolon
- The punctuation mark that ends most Java statements.
- Single-Line Comment
- A comment beginning with // and continuing to the end of the line.
- Source File
- A text file containing Java code for the compiler to read.
- String
- An object that stores an unchangeable sequence of characters.
- switch Statement
- A statement that selects a code path by matching one value against cases.
- System.out.println()
- A method that prints a value followed by a new line.
- Type Casting
- Explicitly converting a value to another compatible type.
- Variable
- A named place that stores a value a program can use or change.
- Widening Conversion
- An automatic numeric conversion to a type that can represent a wider range of values.
Apprentice
- @Test
- Used to mark a function as a test in JUnit.
- == versus equals()
- A distinction where == compares references while equals() usually compares object content.
- Array
- A fixed-size, indexed collection whose elements all have the same type.
- Array Index
- A zero-based number that identifies an element's position in an array.
- Array Initializer
- A brace-enclosed list of values used to fill an array when it is created.
- Array Length
- The fixed number of elements an array can hold.
- break
- A statement that immediately exits the nearest loop or switch.
- camelCase
- A naming style that starts lowercase and capitalizes each later word.
- case Label
- A possible value that a switch statement can match.
- Command-Line Argument
- A string passed to a Java program when it starts.
- Constant
- A named value intended not to change after initialization.
- continue
- A statement that skips the rest of the current loop repetition.
- default Label
- The switch path used when no case matches.
- Division
- 5 / 2 = 2 -- the remainder is discarded.
- do-while Loop
- A loop that runs its body once before checking whether to repeat.
- Enhanced for Loop
- A loop that visits each element of an array or iterable collection.
- enum
- A type that defines a fixed set of named constants.
- Enumeration Constant
- One of the named values declared inside an enum.
- equals()
- A method used to test whether two objects have equal content.
- equalsIgnoreCase()
- A String method that compares text without treating letter case as different.
- Escape Sequence
- A backslash code that represents a special character inside a string or character literal.
- final
- A modifier that prevents reassignment, overriding, or inheritance depending on where it is used.
- for Loop
- A loop that keeps its setup, condition, and update together.
- Fully Qualified Name
- A type's complete name including its package.
- import Statement
- A declaration that lets code use a type by its short name.
- Infinite Loop
- A loop whose stopping condition never becomes false.
- Instance Variable
- A field stored separately in every object created from a class.
- Java API
- The standard classes and interfaces supplied with the Java platform.
- Java Naming Conventions
- Common capitalization patterns that make Java names consistent and recognizable.
- java.util.Random
- A class that produces pseudorandom values of several primitive types.
- Local Variable
- A variable declared inside a method or block and usable only there.
- Loop Counter
- A numeric variable used to track loop repetitions or positions.
- Math Class
- A standard class containing constants and static mathematical methods.
- Math.random()
- A method that returns a pseudorandom double from 0.0 up to, but not including, 1.0.
- Method Argument
- A value supplied to a parameter when a method is called.
- Method Overloading
- Defining methods with the same name but different parameter lists.
- Method Parameter
- A named input declared by a method.
- Multidimensional Array
- An array whose elements are themselves arrays.
- Nested Loop
- A loop placed inside another loop.
- Package
- A named group used to organize related Java types and avoid naming conflicts.
- Random Number
- A value selected by a generator so its next result is difficult to predict casually.
- Recursion
- A technique in which a method calls itself with a smaller version of the problem.
- Return Type
- The type of value a method promises to return.
- Return Value
- The result a method sends back to its caller.
- Scanner
- A standard-library class commonly used to read typed input.
- Scope
- The part of a program where a name can be used.
- Standard Input
- The input stream a program normally reads from the keyboard or its launching process.
- Static Variable
- A field shared by every object of a class.
- String Concatenation
- Joining strings end to end, commonly with the + operator.
- String Immutability
- The rule that a String's character sequence cannot change after the object is created.
- String Index
- A zero-based position used to locate a character in a String.
- String Interpolation
- Inserting values into text; Java normally uses formatting methods rather than interpolated string literals.
- String Length
- The number of UTF-16 code units in a String.
- StringBuilder
- A class for efficiently building or changing a sequence of characters.
- substring()
- A String method that returns part of an existing string.
- Ternary Operator
- The ?: operator, which chooses one of two values from a condition.
- Ternary Operator
- A single line if/else statement.
- Text Block
- A multiline string literal enclosed by three double quotes.
- var
- A reserved type name that asks the compiler to infer a local variable's type.
- void
- A return type showing that a method returns no value.
- while Loop
- A loop that repeats while its condition remains true.
Journeyman
- Aggregation
- A relationship where one object uses another object that can exist independently.
- Annotation
- A way of marking a method so that the runtime knows to use it a certain way..
- Assertion
- A development-time check that reports when an expected condition is false.
- AssertJ
- A Java library that gives Java fluent, readable assertions.
- Association
- A general relationship in which objects know about or work with one another.
- Buffered Reader
- A reader that buffers characters so text can be read efficiently.
- catch Block
- A block that handles a matching exception from its try block.
- Checked Exception
- An exception the compiler requires code to catch or declare.
- Composition
- Building a class from other objects that handle parts of its work.
- Constructor
- Special class code that initializes a new object.
- Constructor Chaining
- Calling another constructor so initialization logic can be reused.
- Custom Exception
- An application-specific exception type created by extending an exception class.
- Default Constructor
- A no-argument constructor supplied by the compiler when a class declares none.
- Default Method
- An interface method with an implementation inherited by implementing classes.
- Dynamic Dispatch
- Choosing an overridden instance method at runtime from the object's actual class.
- Encapsulation
- Keeping an object's data behind methods that control how it is read or changed.
- Exception
- An object describing a problem that interrupts normal program flow.
- Exception Handling
- Using try, catch, and related statements to respond to failures.
- Field
- A variable declared in a class and stored with an object or the class itself.
- File
- A filesystem path together with operations for inspecting or managing it.
- File Input/Output
- Reading data from files and writing data to files.
- finally Block
- A block that normally runs after try and catch whether an exception occurred or not.
- Getter
- A method that returns an object's stored value.
- hashCode()
- A method that produces an integer used by hash-based collections.
- Inheritance
- Creating a class that receives accessible members from another class.
- Instance
- A particular object created from a class.
- instanceof
- An operator that tests whether an object is compatible with a given type.
- Interface
- A contract describing behavior that implementing classes agree to provide.
- java.nio.file
- The package containing modern APIs for paths, files, directories, and file operations.
- Method Overriding
- Providing a subclass version of an inherited instance method.
- Mockito
- The standard Java library for mocking objects for unit tests.
- Multiple Inheritance
- Inheriting from more than one parent type, supported in Java through interfaces rather than classes.
- new Keyword
- An operator that creates an object or array and returns its reference.
- Object
- A class instance that combines its own state with available behavior.
- Object Class
- The root class from which every Java class ultimately inherits.
- Object Equality
- The rules that decide when two objects should count as having the same value.
- Package-Private Access
- The default access that limits a type or member to its package.
- Path
- A modern Java representation of a location in a filesystem.
- Polymorphism
- Using one declared type to work with objects that provide different implementations.
- private
- An access modifier that limits a member to its declaring top-level class.
- protected
- An access modifier that permits package access and access through subclasses.
- public
- An access modifier that makes a type or member broadly accessible.
- Reference Variable
- A variable that stores a reference to an object rather than the object itself.
- Serialization
- Converting an object's state into data that can be stored or transferred.
- Setter
- A method that validates or changes an object's stored value.
- Stack Trace
- A report showing the active method calls at the point an error occurred.
- Static Interface Method
- A utility method that belongs to an interface rather than its implementations.
- Subclass
- A class that extends another class.
- super
- A reference used to access a superclass constructor or member.
- Superclass
- The class that another class directly extends.
- this
- A reference to the current object inside its instance code.
- throw
- A statement that deliberately raises an exception object.
- throws
- A method declaration clause listing exceptions callers may need to handle.
- toString()
- A method that returns a readable text representation of an object.
- transient
- A field modifier that excludes the field from Java's default serialization.
- try Block
- A block containing code that may throw an exception.
- Unchecked Exception
- A runtime exception the compiler does not require code to catch or declare.
Freelancer
- ArrayList
- A resizable List backed by an array.
- Autoboxing
- The compiler's automatic conversion from a primitive value to its wrapper object.
- Binary Search - Java
- A Binary Search is a searching algorithm used to search a collection or array.
- Bounded Wildcard
- A wildcard restricted to types above or below a stated type in the hierarchy.
- Build Tool
- Software that automates compiling, testing, packaging, and dependency resolution.
- collect()
- A terminal stream operation that gathers results into a collection or other container.
- Collection Framework
- Java's standard interfaces and classes for storing and working with groups of objects.
- Comparable
- An interface a class implements to define its natural ordering.
- Comparator
- An object that defines an external ordering for values.
- Date-Time API
- The java.time types for working with dates, times, durations, and time zones.
- Debugger
- A tool for pausing a program and inspecting its execution state.
- Dependency
- External code that a project needs to compile or run.
- Deque
- A double-ended queue that adds and removes elements at either end.
- filter()
- A stream operation that keeps only elements passing a test.
- Functional Interface
- An interface with one abstract method that can be implemented by a lambda.
- Generics
- Type parameters that let classes and methods work safely with different reference types.
- Gradle
- A build automation tool configured with Groovy or Kotlin scripts.
- HashMap
- A hash-based Map with no guaranteed iteration order.
- HashSet
- A hash-based Set with no guaranteed iteration order.
- Intermediate Operation
- A lazy stream operation that transforms or filters values and returns another stream.
- Iterator
- An object that visits collection elements one at a time.
- JAR File
- A ZIP-based archive that packages Java classes and related resources.
- JUnit
- A popular Java framework for writing and running automated tests.
- Lambda Expression
- A compact function-like value that implements a functional interface.
- LinkedList
- A List and Deque whose elements are connected as a chain of nodes.
- List
- An ordered collection that allows duplicate elements and positional access.
- Logging
- Recording structured runtime events to help operate and diagnose software.
- Map
- A collection that associates unique keys with values.
- map()
- A stream operation that transforms each element into another value.
- Maven
- A build and dependency-management tool configured mainly with pom.xml.
- Method Reference
- A compact lambda form that points to an existing method with ::.
- Mock Object
- A controlled stand-in used to verify how code interacts with a dependency.
- Optional
- A container that explicitly represents either one non-null value or no value.
- Queue
- A collection designed to hold elements waiting to be processed.
- reduce()
- A stream operation that combines elements into one result.
- Regular Expression
- A text pattern used to find, validate, or replace matching characters.
- Set
- A collection that does not keep duplicate elements.
- Stream
- A pipeline for processing a sequence of values without storing the values itself.
- Stream Pipeline
- A stream source followed by intermediate operations and one terminal operation.
- Terminal Operation
- A stream operation that produces a result or side effect and ends the pipeline.
- Test Fixture
- The known objects and data prepared for a test.
- TreeMap
- A Map that keeps its keys sorted.
- TreeSet
- A sorted Set that keeps elements in their natural or supplied order.
- Type Erasure
- The compiler process that removes most generic type details from runtime bytecode.
- Type Parameter
- A placeholder type declared by a generic class, interface, or method.
- Unboxing
- The compiler's automatic conversion from a wrapper object to its primitive value.
- Unit Test
- A small automated check of one focused unit of behavior.
- Wildcard Type
- A ? type argument representing an unknown reference type.
- Wrapper Class
- An object type corresponding to a primitive, such as Integer for int.
Master
- Atomic Variable
- A value supporting thread-safe single operations without an explicit lock.
- Bytecode
- Platform-independent instructions produced by the Java compiler for the JVM.
- Class Loader
- A JVM component that finds class data and creates runtime Class objects.
- Classpath
- The locations where Java looks for classes and resources outside named modules.
- CompletableFuture
- A Future that supports asynchronous stages and completion callbacks.
- Deadlock
- A state where threads wait forever for locks held by one another.
- Executor Service
- A service that manages worker threads and schedules submitted tasks.
- Future
- A handle for a result that may become available later.
- Garbage Collection
- Automatic recovery of heap memory from objects a program can no longer reach.
- Heap Memory
- Runtime memory where Java objects and arrays are generally stored.
- HotSpot JVM
- A widely used JVM implementation that optimizes frequently executed code.
- Java Memory Model
- The rules describing how threads observe shared memory and coordinate changes.
- Java Platform Module System
- Java's built-in system for reliable configuration and strong module boundaries.
- Just-in-Time Compilation
- Runtime compilation of frequently used bytecode into native machine code.
- Memory Leak
- Unwanted memory growth caused by retaining references to objects no longer needed.
- Module System
- A way to group packages with explicit dependencies and exported APIs.
- module-info.java
- A source file that declares a Java module's name, dependencies, and exported packages.
- Monitor Lock
- The intrinsic lock associated with every Java object.
- OutOfMemoryError
- An error raised when the JVM cannot allocate required memory.
- Race Condition
- A bug where a result depends on unpredictable timing between threads.
- Record Class
- A compact class for immutable-style data whose core members are generated by the compiler.
- Reflection
- Inspecting and using types, members, and annotations at runtime.
- Runnable
- A functional interface representing work that can be run by a thread or executor.
- Sealed Class
- A class or interface that explicitly limits which types may extend or implement it.
- Stack Memory
- Per-thread memory holding method frames, local values, and return information.
- Synchronization
- Coordinating threads so shared state is accessed safely and changes are visible.
- Thread
- An independently scheduled path of execution inside a process.
- Volatile Variable
- A field whose reads and writes have special cross-thread visibility guarantees.