我正在尝试访问本地数据库并将数据提取出来并将其存储在一个数组中......但我不断收到一个空指针异常,请帮忙?
int rows = 0;
int colNum = res.getMetaData().getColumnCount();
res.beforeFirst();
while(res.next()){
rows++;
for(int i = 1; i < colNum; i++){
teamTable[rows - 1][colNum - 1] = res.getString("Team");
teamTable[rows - 1][colNum - 1] = res.getInt("Goal Difference");
teamTable[rows - 1][colNum - 1] = res.getInt("Points");
System.out.println(teamTable[rows - 1][colNum - 1]);
}
}