📅  最后修改于: 2022-03-11 14:52:05.158000             🧑  作者: Mango
public double avg()
{
int sum = 0;
for (int i = 0; i < size; i++)
{
sum += elementData[i];
}
double avg = (double) sum / size;
return avg;
}