You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a named parameter is also an initializing formal, then the name affects three places in the program:
The name of the parameter variable inside the body of the constructor.
The name used to pass an argument at the callsite.
The name of the corresponding instance field to initialize with that parameter.
This isn't quite right: the parameter variable is not in scope in the body of the constructor (the field is). Right? The parameter variable is only in scope in the initializer list.