As mentioned in Java Docs:
Parameters refers to the list of variables in a method declaration.
Arguments are the actual values that are passed in when the method is
invoked. When you invoke a method, the arguments used must match the
declaration's parameters in type and order.
E.g. moveCircle()
method has 3 parameters in declaration like: circle
, deltaX
, deltaY
.
public void moveCircle(Circle circle, int deltaX, int deltaY) {
//...
}
E.g. moveCircle()
method is invoked and has 3 arguments:
moveCircle(myCircle, 23, 56)
If we speak about loops, then we have the general form of the for statement like:
for (initialization; termination;
increment) {
statement(s)
}
Where is:
- The initialization expression initializes the loop; it's executed
once, as the loop begins.
- When the termination expression evaluates
to false, the loop terminates.
- The increment expression is invoked
after each iteration through the loop; it is perfectly acceptable for
this expression to increment or decrement a value.