title: Using subclass objects in superclass object
body: <p>I'm kinda new to <code>Java</code>, so I have a, rather dumb, question: Is it possible to have and use subclass'es objects in superclass which too have a constructor?</p>
  
  <p>Here's an example what I want to do: I have Superclass <code>Team</code> and subclass <code>Player</code>. I want to create <code>Player</code> object, which contains variables like <code>name</code>, <code>surname</code>, <code>height</code>, etc. . And I want to access this <code>Player</code> object in <code>Team</code> class, which have it's name, positions and other variables, to assign the <code>Player</code> object to his position in the <code>Team</code>. Lets say, <code>Player: John Doe</code> is in <code>Team</code> named <code>Red</code> and he is a <code>Goalkeeper</code>. </p>
  
  <p>And all together, is it possible to access all of this in <code>main</code> function? For example I want to print out all Team Red's players names.</p>
  
  <p>Sorry, it's kinda complicated to explain what I want to do, but isn't this have to do something with <code>extends</code>?</p>