From the Code.org CSA vocabulary definitions:
actual parameter - the value to assign to the formal parameter
argument - the specific value provided when a method or constructor is called
Can someone explain the difference in these two terms? Thanks!
Hi @michael.fiscus, this is a wonderful question that I have wrestled with as well. I know in the past I have told my students that they are synonyms. I also just did a little bit of digging on stackoverflow.com and geeksforgeeks.com (which are my usual go to’s for questions like this) and couldn’t find an immediate answer. I’ll keep digging and see if I can find a more academic explanation. Hopefully others will see this and chime in as well.
Best,
-Sam
Hello @michael.fiscus,
At first i was also confused because I have never ever head of the term “actual parameter” before because as you know arguments and parameters are pretty much interchangeable so interpreting it literally i assume it means the actual value that the argument is holding CSA ought to make this more clearer but I’ll break it down
Ex
argument: name = actual parameter: “joe”
here we see the argument variable name with the actual parameter value of “joe” to further avoid confusion just refer to it as the value of the argument because i have never used that wording ever and doesn’t roll off the tongue to well either
Varrience
1 Like
Most Java references that I checked refer to the argument as the value sent from the calling statement (from the runner) to the method or constructor. The parameter is listed in the method or constructor header/signature.
2 Likes