Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String printHighScores(int[] scores)
- {
- String scoresStr = "The high scores are ";
- for (int score : scores)
- {
- scoresStr += score + ", ";
- }
- scoresStr = removeLastComma(scoresStr) + ".";
- return scoresStr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement