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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -