この問題で立ち往生しています。コードの何が問題なのかわかりません。助けてください。私は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);
}