Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. Java Dictionary

Java Dictionary

Beginners Guide: Overview, Features, and Learning PathAn overview of Java, Write Once Run Anywhere, static typing, how execution works (.java → javac → .class → JVM), and a recommended learning path through this dictionary.
Comments (// and /* */ and /** */)Comment syntax in // / /* */ / /** */, when to write comments, and when not to.
[Setup] Java Development EnvironmentSetup instructions for installing, compiling, and running Java.
Creating and Running .java FilesHow to write, compile, and run .java files.
String.length() / charAt()Gets the length of a string and retrieves a character at a specific position.
String.indexOf() / lastIndexOf() / contains()Searches for a substring and checks its existence.
String.startsWith() / endsWith() / matches()Checks prefix, suffix, and regular expression matching.
String.substring()Extracts a portion of a string.
String.replace() / replaceAll() / replaceFirst()Replaces parts of a string.
String.toUpperCase() / toLowerCase() / trim()Converts case and removes whitespace.
String.split() / String.join()Splits and joins strings.
String.equals() / equalsIgnoreCase() / compareTo()Compares strings.
String.valueOf() / Integer.toString()Converts between numbers and strings.
String.toCharArray() / String.copyValueOf()Converts between a string and a character array.
new StringBuilder() / builder.append() / insert()Mutable string operations for appending and inserting.
builder.reverse() / replace() / toString()Reverses, replaces, and converts strings.
Arrays.sort() / Arrays.binarySearch()Sorts an array and performs binary search.
Arrays.copyOf() / Arrays.copyOfRange() / Arrays.fill()Copies and fills arrays.
Arrays.equals() / Arrays.toString() / Arrays.asList()Compares arrays, converts to string, and converts to List.
new ArrayList<>() / list.add() / set() / get()Creates a list, and adds, updates, and retrieves elements.
list.remove() / clear() / size() / isEmpty()Removes elements, clears a list, and checks its size.
list.contains() / indexOf() / subList()Searches within a list and retrieves a sublist.
Collections.sort() / Collections.shuffle() / Collections.reverse()Sorts, shuffles, and reverses a list.
new HashMap<>() / map.put() / get() / getOrDefault()Creates a map, and adds and retrieves entries.
map.remove() / containsKey() / containsValue() / size()Removes entries and checks for key existence.
map.keySet() / values() / entrySet()Retrieves keys, values, and entries from a map.
new HashSet<>() / set.add() / contains() / remove()Creates a set, and adds, checks, and removes elements.
set.size() / isEmpty() / iterator()Gets the size of a set and iterates over it.
new LinkedList<>() / queue.offer() / poll() / peek()Operations on a queue.
new ArrayDeque<>() / deque.push() / pop()Operations on a stack and double-ended queue.
collection.stream() / stream.filter() / map()Creates a stream and filters or transforms its elements.
stream.collect() / toList()Collects a stream into a collection.
stream.forEach() / reduce() / count()Iterates over, aggregates, and counts stream elements.
stream.sorted() / distinct() / limit() / skip()Sorts, removes duplicates, and limits stream elements.
stream.findFirst() / anyMatch() / allMatch() / noneMatch()Searches and evaluates conditions on stream elements.
Optional.of() / isPresent() / orElse() / orElseThrow()A null-safe wrapper class.
Integer.parseInt() / Double.parseDouble()Converts a string to a numeric value.
Integer.MAX_VALUE / MIN_VALUE / Integer.toBinaryString()Integer constants and radix conversion.
Math.abs() / max() / min() / round() / floor() / ceil()Performs numerical calculations and rounding.
LocalDate.now() / of() / getYear() / getMonth()Gets or creates a date.
LocalDateTime.now() / LocalTime.now()Gets the current date, time, or datetime.
DateTimeFormatter.ofPattern() / date.format()Formats and parses date and time values.
new Scanner() / scanner.nextLine() / nextInt()Reads from standard input, strings, and numbers.
new BufferedReader() / reader.readLine()Reads input with buffering.
Files.readString() / Files.readAllLines()Reads the entire content of a file.
Files.writeString() / Files.write()Writes content to a file.
Files.exists() / isFile() / isDirectory() / createDirectory()Checks and creates files and directories.
Files.copy() / move() / list() / walk()Copies, moves, and lists files.
Pattern.compile() / Matcher.matches() / find()Compiles a regular expression and performs matching.
Matcher.replaceAll() / replaceFirst()Replaces text using a regular expression.
try / catch / finally / throwThe basic syntax for exception handling.
try-with-resources / AutoCloseableAutomatically closes resources.
class / new / Constructor / thisDefines a class and creates an instance.
public / private / protected / static / finalAccess modifiers, static members, and constants.
extends / super / @OverrideInheritance and method overriding.
interface / implements / abstractInterfaces and abstract classes.
Objects.equals() / Objects.toString() / Objects.requireNonNull()The Objects utility class.
Generics (<T>)Defines classes and methods with type parameters.
Lambda Expressions / (x) -> x * 2A concise syntax for anonymous functions.
Predicate / Function / Consumer / SupplierMajor functional interfaces.
enumDefines and uses enumeration types.
recordAn immutable data class.
new Thread() / thread.start() / RunnableCreates and starts a thread.
ExecutorService / Executors.newFixedThreadPool()Executes tasks using a thread pool.
CompletableFuture.supplyAsync() / thenApply() / join()Asynchronous processing.
System.out.println() / System.err.println() / System.inStandard output, error output, and standard input.
System.currentTimeMillis() / System.nanoTime() / System.exit()Time measurement and process termination.
Objects.toString() / getClass() / instanceofChecks the type of an object and converts it to a string.
Array Basics (Java)Fixed-length arrays in Java; covers declaration, initialization, element access, multi-dimensional arrays, and when to use ArrayList instead.
final (Java)The final keyword makes variables non-reassignable, methods non-overridable, and classes non-inheritable in Java.
for Loop (Java)The for loop combining initialization, condition, and update; covers counting, break, continue, and labeled nested loops.
Enhanced for / for-each (Java)The enhanced for statement that iterates over arrays and Iterable collections concisely without an index variable.
if / else if / else (Java)The basic conditional branching syntax in Java.
import Statement (Java)The import statement for using classes and interfaces; covers individual, wildcard, and static imports.
main Method / static (Java)The public static void main(String[] args) entry point and how static methods and fields work in Java.
Operators (Java)Arithmetic, comparison, and logical operators; covers integer division truncation, the + operator for strings, and short-circuit evaluation.
Primitive Types (Java)The eight primitive types that store values directly on the stack; covers bit size, value range, wrapper classes, and type conversion.
return / void (Java)Declaring return types, returning values with return, early exit in void methods, and returning multiple values.
switch Statement / switch Expression (Java)The switch statement and the switch expression finalized in Java 14; covers strings, enums, and returning values with yield.
Ternary Operator (Java)Writes if/else as a one-liner with condition ? true_value : false_value; covers type constraints and readability of nesting.
var (Local Variable Type Inference) (Java)var added in Java 10 lets the compiler infer the local variable type from the right-hand side; not usable for fields, parameters, or return types.
while / do-while (Java)The while loop that repeats while true and do-while that always runs once first; covers infinite loops and input-loop patterns.