public class Student {
public static void main(String[] args) {
int [] arr={23,12,43,234,345,21,322};
int max=getMax(arr);
System.out.println(max);}
public static int getMax(int[] arr)
{
int max=arr[0];
for(int x=1;x<=arr.length;x++)
{
if (arr[x]>max)
max=arr[x];
}
return max;
}
}
緋翼
果丶
Baby_Q
__innocence
慕的地6079101
相关分类