Below is part of my code for a simple java game. I am trying to keep the most recent 10 scores and names of the game in the prevScore and prevScoreName arrays. Both return statements in the method come up as errors, saying it requires int[] and what is found is int. The first two lines below are in the main method of my code, calling up the method. I have no idea what to do, any help would be appreciated.
prevScore = scoreChange (prevScore, score);
prevScoreName = nameChange (prevScoreName, newName);
public static int[] scoreChange (int prevScore[], int score)
{
for (i=1; i<prevScore.length;i++){
prevScore[i] = score;
System.out.println(prevScore[i]);}
return prevScore[i];
}
public static String[] nameChange (String prevScoreName[], String newName)
{
for (i=1; i<prevScoreName.length;i++){
prevScoreName[i] = newName;
System.out.println(prevScoreName[i]);}
return prevScoreName[i];
}