简单多线程:龟兔赛跑
@Test public void test() { TR tr = new TR("兔子"); TR tr1 = new TR("乌龟"); tr.start(); tr1.start(); } class TR extends Thread { public TR(String name) { super(name); } @Override public void run() { for (int i = 1; i < 101; i++) { System.out.println(getName() + "说,我跑了" + i + "米"); } } }#学习路径#