创建列表
但首先.....我只是想确认您的 LoadQueue 类是否是这样的......
class LoadQueue
{
///I dont know why this would be called Queue but you could have a queue as a datamember and add and remove data to this queue...LikeThis
//Queue q;
String msg;
String queuename;
Boolean t;
LoadQueue(String x,String y, Boolean z)
{
//q=new LinkedList<Object>;
msg=x;
queuename=y;
t=z;
}
}
现在 ......
list.add(new LoadQueue("DATA_QUEUE1", "QUEUE1", false));
==================================================== ==================
或者你想要的是这样的:
List list=new ArrayList<Object>();
LoadQueue q=new LoadQueue("DATA_QUEUE1", "QUEUE1", false);
list.add(q.msg);
list.add(q.queuename);
list.add(q.t);