简体   繁体   中英

Thread.start() prints 0 on the console

I cant figure out why the following line of code prints on the console

new Thread(this).start()

this output: http://i.stack.imgur.com/TWoiZ.png

This is a Runnable object.

Further debugging made me realize that it seems to be connected to the start0() method in the .start()

That line will cause the run() method of the Runnable to be executed; presumably that method prints this output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM