当前位置: 代码迷 >> Eclipse >> response.setData("onlineUsers" new CopyOnWriteArrayList<User>(DataBuffer.online解决办法
  详细解决方案

response.setData("onlineUsers" new CopyOnWriteArrayList<User>(DataBuffer.online解决办法

热度:128   发布时间:2016-04-23 13:57:27.0
response.setData("onlineUsers", new CopyOnWriteArrayList<User>(DataBuffer.online
response.setData("onlineUsers", new CopyOnWriteArrayList<User>(DataBuffer.onlineUsersMap.values()));
总是说new CopyOnWriteArrayList<User>没有定义,这是怎么回事?

------解决方案--------------------
List<User> list=new CopyOnWriteArrayList<User>();


------解决方案--------------------
response.setData("onlineUsers","i kown you")
response.setData("onlineUsers",new String("i kown you"))
String tttt="i kown you";
response.setData("onlineUsers",tttt)

类似的,定义了一个新对象CopyOnWriteArrayList,只是无用其他变量来引用它
  相关解决方案