Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public static String printHighScores(int[] scores)
  2. {
  3. String scoresStr = "The high scores are ";
  4. for (int score : scores)
  5. {
  6. scoresStr += score + ", ";
  7. }
  8. scoresStr = removeLastComma(scoresStr) + ".";
  9. return scoresStr;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement