Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int index = 0 ; index < scores.length ; index++)
- {
- if (newScore > scores[index] && (newScore > scores[0] || newScore < scores[index -1]))
- {
- System.arraycopy(scores, 0, temp, 0, index);
- temp[index] = newScore;
- System.arraycopy(scores, index, temp, (index+1), ((scores.length-1)-index));
- scores = temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement