Inside the loop create a new instance with the different attributes before adding it to the array.
Your loop adds a reference to the same (one) instance of the object to all the slots of the array.
Type: Posts; User: Norm
Inside the loop create a new instance with the different attributes before adding it to the array.
Your loop adds a reference to the same (one) instance of the object to all the slots of the array.
Our posts might have crossed.
Where does the code put any Months objects into the array? The array has been defined but no Months objects have been put into it so all its slots have null values.
Please copy the full text of the error message and post it here. It has information about where the error happened.
Where does the code put any Months objects into the array? The array has been...