Browse by Topic

Popular

Latest

Latest Java Posts

Illustration of a Java method returning a single container object that splits into multiple distinct typed values
Java

Returning Multiple Values from a Java Method

Compare practical ways to return multiple values from a Java method: arrays, maps, records, and plain classes, with the type-safety and readability tradeoffs of each.

Java recordsmethod return typestype safetyJava collections
Diagram showing a Java method returning a value to a caller, with primitive and reference types.
Java

Java Return Value: Syntax and Behavior

java return value: Learn how Java methods return values, including primitive vs reference types, void methods, null handling, and performance considerations.

Javareturn valuesmethod return typesprimitive vs reference
A Java method signature showing multiple parameters separated by commas, with a varargs ellipsis and a grouped parameter object nearby.
Java

Java Multiple Parameters: Syntax, Varargs, and Clean Design

Learn how to declare Java methods with multiple parameters, use varargs for flexible argument lists, avoid overload pitfalls, and keep parameter-heavy code maintainable with parameter objects and builders.

java methodsvarargsmethod overloadingparameter object
Illustration showing a Java method call with arguments flowing into method parameters, highlighting the difference between the two concepts.
Java

Java Argument vs Parameter: The Difference Explained

Understand the difference between arguments and parameters in Java, how they appear in method definitions and calls, and why this distinction matters when reading signatures, debugging, and designing APIs.

JavaMethod ParametersMethod ArgumentsCall by Value
Illustration of Java method parameters showing primitive values and object references passed into a method call.
Java

Java Method Parameters: By Value, Reference, and Varargs

java method parameters: Understand Java method parameters: pass-by-value semantics, reference behavior, varargs, and practical design considerations for working develo...

JavaMethod ParametersPass-by-ValueVarargs
Diagram showing a Java void method call that performs an action without returning a value.
Java

Java Void Method: Syntax and Usage

Learn how to declare, call, and override void methods in Java, including early return behavior and common mistakes.

javavoidmethodsreturn-type
Diagram showing a Java method returning a value to the caller, with a return arrow and a try-finally block.
Java

Java return statement: Syntax and Usage

Learn how the Java return statement works: returning values, early exit from void methods, and behavior with try-finally.

return statementJava methodscontrol flowtry-finally
Illustration of a Java method call showing an object invoking a method with arguments.
Java

Java Method Call: Syntax and Runtime Behavior

Understand Java method call syntax, parameter passing, overload resolution, varargs, and runtime behavior to write reliable code.

Javamethod invocationmethod overloadingvarargs
Diagram showing the components of a Java method declaration with labeled parts and a code example
Java

Java Method Syntax: Parameters, Return Types, and Overloading

A practical guide to Java method syntax: declarations, parameters, return types, varargs, overloading, and common errors.

javamethod declarationmethod parametersreturn types
Blueprint-style illustration showing the structural parts of a Java method declaration as connected geometric segments.
Java

Java Method Declaration: Syntax and Structure

A practical breakdown of Java method declaration syntax: modifiers, return types, parameters, varargs, overloading, and common compile errors.

javamethod declarationjava syntaxmethod overloading