I made a program and want to enter previous dates into a linkedList. My code is
package bowlinggame;
import java.util.Date;
import java.util.LinkedList;
import java.util.TreeSet;
public class BowlingGame {
public static void main(String[] args)
{
TreeSet <String>PlayerNames = new TreeSet<String>();
PlayerNames.add("Steve");
PlayerNames.add("James");
PlayerNames.add("Bob");
for (Object o : PlayerNames)
{
System.out.println(o);
}
LinkedList <Date>SteveDate = new LinkedList<Date>();// Enter the dates here just like scores
LinkedList <Integer>SteveScore = new LinkedList<Integer>();
SteveScore.add(205);
SteveScore.add(240);
SteveScore.add(189);
System.out.println("Steve's last score is " + SteveScore.getLast() + " and the last time he played was " + SteveDate);
}
}