multisend.java
来自「电信ISAG的服务连接和服务」· Java 代码 · 共 45 行
JAVA
45 行
package test.lcsTest;import java.util.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class multiSend { public Timer timer = new Timer(); public multiSend() { } public static void main(String[] args) { System.out.println("main begin..."); System.out.println("Thread.activeCount:" + Thread.activeCount()); //1:getLocation;2:getLocationForGroup;3:getTerminalDistance //4:startGeographicalNotification;5:startPeriodicNotification //6:endNotification int flag = 1; Thread t1 = new Thread(new thread(flag)); System.out.println("thread1 start..."); t1.start(); Thread t2 = new Thread(new thread(flag)); System.out.println("thread2 start..."); t2.start(); Thread t3 = new Thread(new thread(flag)); System.out.println("thread3 start..."); t3.start(); Thread t4 = new Thread(new thread(flag)); System.out.println("thread4 start..."); t4.start(); System.out.println("main end..."); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?