时间:2024-10-13 02:49:40
1、首先我们建立一个Test的测试类
3、然后我们在main方法中写测试代码,使用ArrayList是正确的,ArrayList是List的子类
5、但是使用HashMap就是错误的类型了。