Python | 报错Syntax error:insert “Dimensions“ to complete ReferenceType

Map<int,String> map = new HashMap<int,String>()

报错原因是因为HashMap对象的kkey值可为null。但int没有。

改正:

把int改为Integer就行了。

另:

数据库里可搜索到的值也可以是null,同样不能用Int

HashMap对象的key、value值可为null

HashTable对象的key、value值不可为null

おすすめ

転載: blog.csdn.net/weixin_48419914/article/details/121190203