[Solved] issues with clone and for loop


As Andy Turner said for your first question :

clone() is not being used. It just so happens that the variable is called clone, but that has no semantic importance to the code.

Concerning the for statement he’s composed of 3 parts ,each separated by one ; , and none of them is obligated to be there :

  • The first part is where you can, or not, declare your incremental variable : int i = 0;
  • The second part is where you must put an evaluation resulting on a boolean value : kappa.lengh >= i;
  • The thrid part is where you will modify the variable(s) values : i--;

Since none of these parts are obligated, you could write a correct for loop like this one : for(;;).

Here’s a link to the documentation : For statement.

solved issues with clone and for loop