When I print the object array out, the output is Project.Class. The intended output is to show each object.
The array has already been declared outside of the method.
I tried using mutators however the output was the same.
When I print the object array out, the output is Project.Class. The intended output is to show each object.
The array has already been declared outside of the method.
I tried using mutators however the output was the same.
The problem is your Console.WriteLine(stations[i]);. You've not posted your stations object definition but you need to reference what properties you want to show. Otherwise you will just write out your object.
Console.WriteLine(stations[i].stationNo);
Console.WriteLine(stations[i].stationName);