About Question enthuware.ocajp.i.v8.2.1469 :
Posted: Tue Oct 13, 2015 10:50 am
I think I have found a little ( It is very little) error. Though many people make that I would say it is clearly an error, so I would please you to correct it. Here is what I mean:
An argument list is a list of arguments, when you define for example a method.
A parameter list is a list of paramters and you call with a parameter list something like for example a method, but it has to fit with the argument list of the calles method.
So there is a difference between argument and parameter. ( This difference is for me very important, but I do not know how for you ).
There is a another thing about it. I would say it could be seen as correct, because you "define" the argument list for the method, which is later called ( it is a lambda expression ), but I would like it if you would add something to your explanation to make it more clear.
That is the first explanation of the first question and there is written about an argument list ( it is bold in the quoted test ), but what actually is meant is parameter list, because:Syntactically, this lambda expression is correct. However, remember that a lambda expression does not create a new scope for variables. Therefore, you cannot reuse the variable names that have already been used to define new variables in your argument list .
Here, observe that the variable d is already defined so your argument list cannot use d as a variable name. It would be like defining the same variable twice in the same scope.
An argument list is a list of arguments, when you define for example a method.
A parameter list is a list of paramters and you call with a parameter list something like for example a method, but it has to fit with the argument list of the calles method.
So there is a difference between argument and parameter. ( This difference is for me very important, but I do not know how for you ).
There is a another thing about it. I would say it could be seen as correct, because you "define" the argument list for the method, which is later called ( it is a lambda expression ), but I would like it if you would add something to your explanation to make it more clear.