public double sumHarm(int n){
int total = 0;
for(int i = 1; i <= n; i++) total += (1.0/i);
return total;
}

Something like that should do it.

Regards,
Chris