java - for loop is locking thread -
I hope the following code has to be printed text forever:
thread T = new thread () {public zero run () {for (;;) {System.out.print ("thread example"); }}}; T.start (); But it does not just lock it for loop Can someone tell me?
print does not flush the buffer - - You println , which put a new row and flush the buffer. Basically, you're printing a bunch of , but you're printing for in-memory buffer, you do not see it.
Comments
Post a Comment