When we are in a for loop,
for(int i =0; i< 10 ; i++)
{
System.out.println(i + 1);
}
will execute 1-10
However, if I change System.out.println to lets say a function passed such as
for(int i=0;i<10;i++)
{
passed( "Row" + (i+1));
}
Where passed is
public static void passed(String check) {
System.out.println(check + "Passed");
}
It executes
01 Passed 11 Passed 21 Passed 31 Passed.... 41 51 61
and so forth
Can anyone explain why does it pass the value first and skip the math?
"Row" + (i+1)or"Row" + i+1?