Think this way,

int j=10;
for(int i=1 ; i<10 ; i= i+2) {
...
}

i will give you *,
j-i will give you white space