正在加载图片...
例10.1 public class multiThreadExamplelt public static void main(String args i new My Thread("A") . start;∥)动线程A new MyThread('"B"). start0;∥启动线程B class my Thread extends Thread t public MyThread(string n)super(n);) /m:线程名称 G car例10.1 public class MultiThreadExample1{ public static void main(String []args){ new MyThread("A").start(); //启动线程A new MyThread("B").start(); //启动线程B } } class MyThread extends Thread{ public MyThread(String n){super(n); } //n:线程名称
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有