【发布时间】:2016-07-09 09:50:18
【问题描述】:
如何将对象添加到其他类的数组中? 这是我的代码:
public class One
{
//Loots is a class
public static Loots[] lootsList = new Loots[] { };
}
public class Two
{
Loots MyLoots = new Loots();
// How to add MyLoots to lootsList in THIS class?
}
我不想使用列表
【问题讨论】:
-
请改用
List或ArrayList。容易得多。
标签: java android arrays android-studio