Printing the contents of a List<Object>, prints the last object only over and over? : <p>I am working on a CPU scheduler for an operating systems course.</p>

<p>There are no compilation errors or warnings, but my output file is incorrect.</p>

<p>What is happening is I am using PrintWriter class to write line by line to an output.</p>

<p>I have the following for loop.</p>

<pre><code>for (int TerminationListIndex = 0; TerminationListIndex &lt; TerminationList.size(); TerminationListIndex++) 
{
 Termination_Info TerminationStats = TerminationList.get(TerminationListIndex);

 Output.println(TerminationStats.getJob_ID() + " " + 
                TerminationStats.getClassType() + " " + 
                TerminationStats.getArrivalTime() + " " + 
                TerminationStats.getLoadingTime() + " " + 
                TerminationStats.getTerminationTime() + " " + 
                TerminationStats.getProcessingTime() + " " + 
                TerminationStats.getTurnaroundTime() + " " + 
                TerminationStats.getWaitingTime());
}
</code></pre>

<p>In my eclipse debugger I can view the the TerminationList and see that it holds different objects. The output, however, will print the LAST object in the lists' parameters (Job_ID, Class, ArrTime, LoadTime, TermTime, ProcTime, TurnTime, WaitTime) and I end up with a n output file that has hundreds of lines with the same parameters. In terms of logic, I am fairly confident that it is just some syntax error. Any advice would be greatly appreciated.</p>
