• 2022-06-14 问题

    阅读下面的Java代码,运行结果描述正确的是( )。import java.util.*;public class TestMap{public statci void main(String[] args){Map map=new HashMap( ); map.put(“first”,”football”); map.put(“first”,”basketball”); System.out.print(map.get(“first”));}} A: 编译时发生错误 B: 编译通过,运行时发生错误 C: 正确运行,显示basketball D: 正确运行,显示football

    阅读下面的Java代码,运行结果描述正确的是( )。import java.util.*;public class TestMap{public statci void main(String[] args){Map map=new HashMap( ); map.put(“first”,”football”); map.put(“first”,”basketball”); System.out.print(map.get(“first”));}} A: 编译时发生错误 B: 编译通过,运行时发生错误 C: 正确运行,显示basketball D: 正确运行,显示football

  • 1