亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

數組輸入出什莫問題了

package helloworld;
import java.util.Arrays;
import java.util.Scanner;
public class helloworld {
?public static void main(String[] args){
??//int[] scores={89,56,54,52,-53,56, 98 };
??Scanner input=new Scanner(System.in);
??int[]scores=new int[6];
??for(int i=5;i>0;i--){
???
??? scores[i]=input.nextInt();
??helloworld hello=new helloworld();
??hello.show(scores);}
?}
?public void show(int[] scores){
??Arrays.sort(scores);
??System.out.println(scores[3]);
??System.out.println(scores[5]);
??System.out.println(scores[4]);
?}

?}



正在回答

1 回答

7個數組啊,你寫6個?

0 回復 有任何疑惑可以回復我~
#1

qq_宇_35 提問者

不是的,7個數組的被我注釋了,我知道怎末改了,謝謝
2017-08-03 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

數組輸入出什莫問題了

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號