package com.jichutest;
public class test5 {
public int show(){
int[] ages={18,23,21,19,25,29,17};
int max=ages[0];
for(int i = 0;i<=ages.length;i++ ){
if(ages[i]>max){
max=ages[i];
}
}
return max;
}
public static void main(String[] args){
test5 hello = new test5();
int max=hello.show();
System.out.println("年龄最大为:"+max);
}
}
望远
慕数据8267187
qq_杨树人_0
丶看着远方不悲伤不仰望
liulinbo
相关分类