1d array (File writer and Print Writer)

I am creating a game involving a 1d array and I want to be able to click a button to save my progress in that game.
This is the code I am using:
The array is int a []= {{1,2,3,4,5}};

PrintWriter out;
out = new PrintWriter (new FileWriter (filename));
One of the for loops will be(according to my professor):
for(int i=0; i<values.length; i++)
out.println (""+values[i]);
and the other will be:
for (int i = 0; i < a.length;i++)
   out.println ("" + a[i]);

I understand as to why I would want i to be less than the length of the a array (because you want it to go through the loop less than the length of the a array) but I am unsure of why I would use another array called values. What role would this array play in being able to save the user’s progress in a game?