第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

能用Scanner實現(xiàn)數(shù)組的手動輸入嗎?

能用Scanner實現(xiàn)數(shù)組的手動輸入嗎?

慕粉3703169 2016-07-27 16:34:41
package com.sTudent;import java.util.Arrays;public class stuDent {? public static void main(String[] args) { stuDent hello=new stuDent(); hello.Dges();}? public int Dges(){ ?int[] ages={18,23,21,19,25,29,17}; ?Arrays.sort(ages); ?int max=ages[0]; ?int min=ages[0]; ?for(int i=0;i<ages.length;i++){ ?if(ages[i]>max){max=ages[i];} ?else if(ages[i]<min){min=ages[i];} ?} ?System.out.println("年齡按從小到大排序后為:"+Arrays.toString(ages)); ?System.out.println("最大的年齡為:"+max); ?System.out.println("最小的年齡為:"+min); ?return min;? }}
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 4405 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號