tony narloch wrote:the YearData class does not possess an ArrayList, only variables.
If those variables are defined outside of any method, they are instance variables and should accessed through "getters".
the City class contains an ArrayList.
That makes sense. A City would have YearData, if by that you mean annual weather patterns. The class should be named something more descriptive, like AnnualWeather.
If List<YearData> is an instance variable (it should be), you will need an instance of the class (an object) to access it. You initialize it in City.