After you assign an object relationship:
player1.team = team1;the Player object has a reference to a Team object.
The program can follow that relationship with the dot operator.
For example:
player1.teammeans:
If the Team has a field named:
Every intermediate reference must lead to the expected object.
When reading:
player1.team.namepicture:
player1 : Player
|
v
team1 : Team
name = "Wildcats"That visual model makes the member chain easier to interpret.
The next activity uses the debugger to inspect nested objects directly.