Data Access, Properties, and Methods
- slide 21 : 29
Value Parameters
Value parameters are used for input to methods
Value parameter passing:
A formal parameter corresponds to a local variable
A formal parameter is initialized by the corresponding argument (the value of the actual parameter expression)
A
copy
of the argument is bound to the formal parameter
Implicit conversions may take place
A formal parameter is assignable, but with no effect outside the method
Methods with value parameters in class BankAccount.
Assignments to a formal value parameter do not affect the corresponding actual parameter