我被这个问题困住了,我不知道我的代码有什么问题,请帮助我。我得到error java.lang.nullpointerexception
了这个代码:
List<DataPoint> listPoints;
if((listPoints = hashMap.get(h)) == null) {
listPoints = new ArrayList<DataPoint>();
DataPoint point = new DataPoint((int)songId, i);
listPoints.add(point);
hashMap.put(h, listPoints);
}