错误:
在list中使用addAll()添加一个list时,报空指针异常
List entitys= null;
后来改为
List entitys= new ArrayList<>();
原因:
只在栈中有引用而在堆中没有分配到内存空间
错误:
在list中使用addAll()添加一个list时,报空指针异常
List entitys= null;
后来改为
List entitys= new ArrayList<>();
原因:
只在栈中有引用而在堆中没有分配到内存空间