Card 10/ 10

RecapDifficulty: Intermediate1 min

What a Method Can Change for Its Caller

Five things this topic established, and where each one was.

What the topic established, and which card it was on
The thingWhere
A signature has five parts, and only the parameter list decides which method a call matchesReading a Method Signature From Left to Right
A parameter is a name in the declaration; an argument is a value at the callParameters Are Names; Arguments Are Values
Java passes everything by value, and a reference is a valueJava Copies Everything You Pass
Mutating through the reference reaches the caller; reassigning the parameter does notA Method That Hands You a Different Order
Overloading resolves on the parameter list, never on the return typeWhat Overloading Resolves On, and What It Ignores

A method can change the object you gave it and can never change the variable you gave it. Anything a method needs to hand back, it hands back by returning it.