package com.company;public class MaxScore { public static void main(String[] args) { int [] scores = new int [5]; int max = 0; //记录最大值 //… 循环录入5位学生成绩 // 计算最大值 max = scores[0]; for (int i=1; i<scores.length; i++){ if (scores[i] >max){ max = scores[i]; } } System.out.println(“考试成绩最高分位:“+ max”); }}