Reading Java Headfirst found this example pls if someone can help me understand.
class Scratch {
public static void main(String[] args) {
int x = 0;
int y = 0;
while ( x < 2 ) {
y = y + x;
System.out.print(x + "" + y + " ");
x = x + 1;
}
}
}
I can't wrap my head around whats the function of quotes here in print statement the results vary a lot if you remove them.
The second one adds "Space" but the first somehow adds another integer?!