I basically want to do this
for (j = parametro, int k=0; j < parametro + 3, k<3; j++, k++) {
previsoes[i] += valores[j] * pesos[k] ;
}
I basically want to do this
for (j = parametro, int k=0; j < parametro + 3, k<3; j++, k++) {
previsoes[i] += valores[j] * pesos[k] ;
}
It can.
Note that after the first statement you do not have to specify the type. The increment is correct. I took advantage of and added an example of how to put "two conditions".
So:
class Main {
public static void main(String[] args) {
for (int i = 0, k = 0; i < 10 && k < 3; i++, k++) {
System.out.println(i);
System.out.println(k);
}
}
}