`
tobemoved
  • 浏览: 6642 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
public class Test { static String s = "abc"; { s.charAt( 0); System.out.println(" B"); } static { System.out.println(" A"); s = null; } public Test() { s = "def"; ...
interface B { String getS(); } class A2 implements B { public String getS() { return "A2"; } } public class A implements B { public String getS() { return "A"; } static void show(B b) { System.out.println( b.getS()); ...
//用DOM读取XML public class A {         Document document = null;     public void t() {         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();        try {             DocumentBuilder builder = factory.newDocumentBuilder();             document = builder.parse(configPath);        ...
import java.util.*; import java.lang.reflect.Array; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 2008-7-7 * Time: 9:07:56 * To change this template use File | Settings | File Templates. */ public class ThreadPool { //初始化空闲队列以及工作队列 List freeThreads = new ArrayList(); ...
import java.util.*; import java.io.*; import java.net.*; //线程池类,创建处于使用中和空闲中的进程队列 class ThreadPool{         private Vector freeThreads = new Vector();         private Vector inUseThreads = new Vector();//Vetcor对象         private static int value = 100;//线程池的最大并发线程数         public ThreadPool(){         ...
**     线程池是一组线程,限制执行任务的线程数 */ public class ThreadPool extends ThreadGroup {     private boolean isAlive;     private LinkedList taskQueue;     private int threadID;     private static int threadPoolID;     /**         创建新的线程池,numThreads是池中的线程数     */     public ThreadPool(int numThreads) {         ...
import java.util.LinkedList; import java.util.List; public class ThreadPool ...{     private static ThreadPool instance = null;     // 优先级低     public static final int PRIORITY_LOW = 0;     // 普通     public static final int PRIORITY_NORMAL = 1;     // 高     public static final int PRIORITY_HIGH ...
import java.util.Arrays; import java.util.ArrayList; import java.awt.*; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 2008-7-7 * Time: 14:45:52 * To change this template use File | Settings | File Templates. */ public class oldtest{     int[] a={2,4,6,3,1,9,67};     int[] b={2, ...
import java.util.ArrayList; import java.util.Vector; import java.util.Map; import java.util.Hashtable; import java.io.*; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 2008-7-2 * Time: 13:40:28 * To change this template use File | Settings | File Templates. */ public class Newon ...
Global site tag (gtag.js) - Google Analytics