import java.util.*;
public class HelloScanner {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println(“请输入第一个人的身高:”);
int a=sc.nextInt();
System.out.println(“请输入第二个人的身高:”);
int b=sc.nextInt();
System.out.println(“请输入第三个人的身高:”);
int c=sc.nextInt();
HashMaphs = new HashMap<>(); hs.put("张三",a); hs.put("李四",b); hs.put("小明",c); Integer max = Collections.max(hs.values()); Set > entrySet = hs.entrySet(); for (Map.Entry entry : entrySet) { String key = entry.getKey(); Integer value = entry.getValue(); if (max==value){ System.out.println("最高身高为:"+key+"的身高是"+value+"cm"); } } }
}



