1、lombok(https://projectlombok.org/

    使用lombok可以自动为您的POJO生成get和set方法,减少代码量。

2、单个键值对

DefaultMapEntry kv = new DefaultMapEntry(12, "aaa");

相关文章: