I was reviewing a program I found in internet and I'm trying to figure out how it works, but I can't find anything about this function that could help me.
public static double regress(double x, ArrayList<Double> terms) {
double a = 0.0;
int exp = 0;
Iterator<Double> i$ = terms.iterator();
while (i$.hasNext()) {
double term = i$.next();
a += term * Math.pow(x, exp);
++exp;
}
return a;
}
I know the method is iterating in an ArrayList to calculate a
value, but what does it mean this line Iterator<Double> i$ = terms.iterator();
? More specific, for what is this symbol $
used after the variable i
?