Explain println and print statement after a loop has been executed in Java? -
what happens here, when print used, why not print line stops?
for(int = 0; <=2; i++){ system.out.println(i) system.out.print("s"); } why not print s after 2 this:
0
1
2s
from learnt, said buffer ever? mean? computer know print letter s beside 2 because has stopped there, why not print?
actually print prints s line stops!. problem here is, println put new line first, , print starts place.
Comments
Post a Comment