摘要:
看一个简单的例子,有几个类变量,类初始化时调用类方法,其中还包括简单加法运算,字符串重载以及输出。Clac.java //java源码public class Calc {private static int numberA = 10;private static int numberB = (int) (Math.random() * 7.7);private static String sho... 阅读全文
摘要:
Tomcat是由容器与组件构成,而容器又是由子容器与组件构成,server容器由 service组成,service又由connector与engine组成,tomcat是用lifecycle来带容器与其组件启动和相关事件处理,下面为lifecycle的接口源码:public interface Lifecycle { public static final String START_EVENT ... 阅读全文
摘要:
源码:public class WorkerStack { protected Worker[] workers = null; protected int end = 0; public WorkerStack(int size) { workers = new Worker[size]; } /** * Put the object into the queue. * * @param ob... 阅读全文