摘要: Question: If i have a web application. Then when several clients make requests for the same page (or different pages in the same web application) at the same time. Is there only one Servlet instance... 阅读全文
posted @ 2005-04-17 11:05 Johnny 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 测试代码: importjava.util.*; importjava.io.*; publicclassBadExecJavac { publicstaticvoidmain(Stringargs[]) { try { Runtimert=Ru... 阅读全文
posted @ 2005-03-25 11:25 Johnny 阅读(3504) 评论(1) 推荐(0) 编辑
摘要: Question: 1.In the Java API Doc, i saw the statement below: This integer need not remain consistent from one execution of an application to another execution of the same application. Does it mean t... 阅读全文
posted @ 2005-03-22 10:01 Johnny 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Question: How can i differentiate "variable","argument","parameter"&"attribute"? Answers: this is just my understanding/usage of these terms. so no gurantee: all the term are variables because they ... 阅读全文
posted @ 2005-03-09 10:05 Johnny 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 下面是两个典型例子: public class SystemDemo { int i; public static void main(String[] args) { char inputChar; int i; System.out.println(i); } } 编译时出现以下错误信息: SystemDemo.java:11: variab... 阅读全文
posted @ 2005-02-08 16:41 Johnny 阅读(601) 评论(0) 推荐(0) 编辑
摘要: 写了一个类 InventoryHandler 继承一个父类 DefaultHandler。父类中定义的方法抛出了一个SAXException: public void fatalError(SAXParserException spe) throws SAXException 在子类中实现该方法,但定义时并没有抛出例外: public void fatalError(SAXParserExce... 阅读全文
posted @ 2005-02-02 22:25 Johnny 阅读(368) 评论(0) 推荐(0) 编辑
摘要: XML数据应该以何种方式保存进数据库。 例子, 比如一个论坛的帖子,其XML文档结构如下: 000001 某某 某某时间 某某问题 某某内容 000001 0001 某某 某某时间 某某内容 000001 0002 某某 某某时间 某某内容 … 那么,我有两种设计方案... 阅读全文
posted @ 2005-01-26 17:49 Johnny 阅读(826) 评论(0) 推荐(0) 编辑
摘要: 最近一段时间在写一个类树的时候,发现了一些关于继承的值得思考的问题,于是自己写了简单的测试代码进行分析,经过分析与跟csdn论坛朋友的探讨,弄清楚了java的一些继承的机制,但依然有所迷惑。 测试代码如下: public abstract class A { int i=1; public void printI() { System.out.printl... 阅读全文
posted @ 2004-08-23 12:00 Johnny 阅读(3306) 评论(8) 推荐(0) 编辑
摘要: 昨晚非常气愤,其实经过那么多年,我已经对这支无资格代表中国的中国足球队彻底失望了,但昨晚对的是日本,我一定得支持中国,结果中国输了,今天看香港新闻,北京球迷涌上街头,烧日本国旗,打日本记者,围攻日本队的车,游行到日本大使馆高唱国歌,我在这里向北京球迷致敬,球我们输了,但我们要长我们的气,北京球迷的举动振奋全全中国的人民,我们一定要灭掉日本。 让人非常气愤的是,据香港翡翠新闻讲述,一个日本官员竟然公... 阅读全文
posted @ 2004-08-08 13:45 Johnny 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 创建一个简单标签的步骤: 创建实现了 Tag 接口(准确地说是 javax.servlet.jsp.tagext.Tag)的标签处理程序类。 创建一个 TLD 文件。 在标签处理程序 Java 类中创建属性。 在 TLD 文件中定义与标签处理程序 Java 类中定义的属性对应的属性。 在 TLD 文件中声明 scriptlet 变量。 实现 doStartTag() 方法。在标签处理程序类中... 阅读全文
posted @ 2004-08-05 16:14 Johnny 阅读(2362) 评论(4) 推荐(0) 编辑