You should use dp[count]
insted of dp[count+1] in this line:
dp[count+1] = new DataPoint(count+1, db.getDetails().getWeight());
because indices in dp will be 0 to count
solved Array[index + 1] causing the program FATAL error [duplicate]
You should use dp[count]
insted of dp[count+1] in this line:
dp[count+1] = new DataPoint(count+1, db.getDetails().getWeight());
because indices in dp will be 0 to count
solved Array[index + 1] causing the program FATAL error [duplicate]