摘要:
1 package ticket; 2 3 public class Person implements Runnable { 4 private int count =10; 5 private int num = 0; 6 7 @Override 8 public void run() { 9 // TODO Aut... 阅读全文
摘要:
1 package run; 2 3 public class RunThread implements Runnable { 4 private int count; 5 6 @Override 7 public void run() { 8 // TODO Auto-generated method stub 9 ... 阅读全文
摘要:
1 package hospital; 2 3 public class VipThread implements Runnable{ 4 5 @Override 6 public void run() { 7 // TODO Auto-generated method stub 8 for(int i=0;i<10;i+... 阅读全文
摘要:
1 package mountain; 2 /** 3 * 属性:爬100米时长(time) 多少个100米(num); 4 * 线程休眠模拟爬山延时 5 * @author L 6 * 7 */ 8 public class ClimbThread implements Runnable{ 9 10 private int time; ... 阅读全文
摘要:
1 package hello2; 2 /** 3 * 每个线程均输出20次消息数字、“你好”、线程名 4 * @author L 5 * 6 */ 7 public class MyThread implements Runnable { 8 9 @Override 10 public void run() { 11 // TO... 阅读全文
摘要:
1 package hello; 2 /** 3 * 创建两个子线程,每个线程均输出20次消息数字、“你好”、线程名 4 * @author L 5 * 6 */ 7 public class MyThread extends Thread{ 8 9 public void run() { 10 for(int i=0;i<20;i++... 阅读全文