Phase 1 Language Basics + Advanced _1-3-Java language senior _05- abnormal and multi-threaded _ the first two threads implementation _14_ anonymous inner class way to achieve thread creation










Start method is called open thread

Realization Runnable interface

Prior is written so

here is a new Runnable which then override the run method




here, of course you can also use a Runnable to receive

new thread transfer implementation class r, and then call start classes open thread

Simplified interface means

Runnable object directly in a new Thread constructor








 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11259567.html