+ 1

What is difference between parameters and arguments in methods?

6th Dec 2018, 4:06 PM
Nitin Gutte
Nitin Gutte - avatar
2 Réponses
+ 5
A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method's parameters. Parameter is variable in the declaration of function. Argument is the actual value of this variable that gets passed to function.
6th Dec 2018, 4:12 PM
Masud Rana Shawon
Masud Rana Shawon - avatar
+ 1
It's just two names for the same thing
6th Dec 2018, 4:11 PM
Gordon
Gordon - avatar