我目前有预定义数据
String[] values = new String[] { "Android", "iPhone", "WindowsMobile", "Blackberry", "WebOS", "Ubuntu",
"Windows7", "Max OS X", "Linux", "OS/2", "Ubuntu", "Windows7", "Max OS X", "Linux", "OS/2", "Ubuntu",
"Windows7", "Max OS X", "Linux", "OS/2", "Android", "iPhone", "WindowsMobile" };
我想从对象数组中插入值
List<Scores> myScore = db.getAllScore();
for (Scores cn : scor)
{
// how can I insert it into values
}
答案 0 :(得分:1)
试试这个。
List<Score> myScore = db.getAllScore();
for (int i = 0,j=value.length; i < myScore.size(); i++,j++) {
value[j]=myScore.get(i);
}