

class Mar20 {
	public static void main(String[] args) {

		// create an instance with the name set to joe 
		Player joe = new Player("joe");		

		// print the reference stored in variable named joe
		System.out.println(joe);

		// print the value of the name field for joe
		System.out.println(joe.getName());


		// create a second instance
		Player sue = new Player("sue");


		// create an array of 2 players
		Player[] players = new Player[2];

		// add joe and sue to players array
		players[0] = joe;
		players[1] = sue;
			
		// print the names of the players in the array
		for(int i = 0; i < players.length; i++) {
			Player p = players[i];
			System.out.println(p.getName());
		}			
		
	}
}
