이 기사의 예는 Java가 해당 순위 배열을 얻기 위해 점수 배열을 제공하는 방법을 인식하는 방식을 알려줍니다. 참조를 위해 모든 사람을 위해 공유하십시오. 특정 구현 방법은 다음과 같습니다.
패키지 test01;/** * 점수 배열을 제공하고 다음과 같은 경우 해당 순위 배열 * 열을 가져옵니다. * * * * * * * * * * * * * * * * * * * * * * * /import java.util.collection; util.list; public class scoreRank {// public static void show (int x : s) out.print (x); 공개 정적 int [] scoreRank (int [] score) {int [] new int [score.length]; LIS. ADD (x). 0; i <score.length; } public static void main (string [] args) {int [] score = {4,2,5,4}; System.out.print (원래 점수 : ");
결과는 다음과 같습니다.
원래 점수 : 4254
서신 : 2312
이 기사는 모든 사람의 Java 프로그램 설계에 도움이되기를 바랍니다.