I would like to write out the values of my array to a file.
public void Write(String fileName) throws IOException
{
PrintWriter outFile;
outFile = new PrintWriter(new FileWriter(fileName));
for(int K = 0 ; K < CurrentCount ; K++)
outFile.println(List[K].toString());
outFile.close();
}
The data entered into the file was: WeatherStation@1194a4e
The WeatherStation class has my constructor and get and set methods
List[K] = new WeatherStation(Location, Temp, Title, Air, Pollen);
I was expecting all of the attributes above to get placed into the file.