Method Parameters in Java — a practical guide to Java method parameters with clear examples you can reuse in real projects.
Java Tutorial Series (29/90). Prefer one article? Read the complete Java tutorial.
Short description
Java is pass-by-value. For objects, the reference value is copied — you can mutate the object, but reassigning the parameter does not change the caller’s reference.
Parameters
static void greet(String name) {
System.out.println("Hi " + name);
}