Write a program that lets the user enter the name of a team and then displays the number of times that team has won the world series in the time period from 1903 through 2009. The WorldSeriesWinners.txt file contains a chronological list of the world series winning teams from 1903 through 2009 the first like in the file is the name of the team that won in 1903 and last line is the name of team that won in 2009. Note that the world series was not played in 1904 and 1994.
There are many solutions to this problem, you could import a file into a guava multimap, into array or array list. In the code below we took the approach of using java 8 syntax which could easily be transformed based on your JDK version requirement.
Breaking it down
Output
Level Up
Modify the program to allow a user to enter in a team until they enter in -1.