如何在java中给列表赋值?如果我指定一个值,它会显示 cannot convert from int[] to List<Integer>
```
public class GetAddonProductsProcessorTest {
@Test
public void AddonProductstest() throws Exception{
//BasicDBList newobj = new BasicDBList();
List<Integer> newobj = {1,2,3};
}
1条答案
按热度按时间lkaoscv71#
可以使用arrays.aslist创建列表