ThreadDemo1

2019-10-10  本文已影响0人  勇者与王者
package multiThread;
/**
* 
* @author q06285:
* @version 创建时间:2019年10月10日 上午9:48:03
* 
*/
public class ThreadDemo1 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        Hero gareen = new Hero();
        gareen.name = "盖伦";
        gareen.hp = 616;
        gareen.damage = 50;
        
        Hero teemo = new Hero();
        teemo.name = "提莫";
        teemo.hp = 300;
        teemo.damage = 30;
        
        Hero bh = new Hero();
        bh.name = "赏金猎人";
        bh.hp= 500;
        bh.damage = 65;
        
        Hero leesin = new Hero();
        leesin.name = "李青";
        leesin.hp = 455;
        leesin.damage = 80;
        
        KillThread killThread1 = new KillThread(gareen, teemo);
        killThread1.start();
        KillThread killThread2 = new KillThread(bh, leesin);
        
        killThread2.start();
    }
}
上一篇下一篇

猜你喜欢

热点阅读