摘要:
6:复用类合成所使用的语法 如果想对reference进行初始化,那么可以在以下几个时间进行: 1。在定义对象的时候。这就意味着在构造函数调用之前,它们已经初始化完毕了。 2。在这个类的构造函数里。 3。在即将使用那个对象之前。这种做法通常被成为“偷懒初始化(lazy initialization)”。如果碰到创建对象的代价很高,或者不是每次都需要创建对象的时候,这种做法......
摘要:
为什么我选择了nokia6220我开始考虑换手机是在几周前。我想换一个彩屏的,有摄像功能,并且支持j2me midp的手机。刚开始问了一些用过java手机的朋友,有人建议用siemens的java手机cv65,性价比高。像什么内存多达10m, 还支持midp2.0,的确很诱人的。可是我上网一查,关于siemens的手机更多的是负面评价,评价最多的是siemens容易死机。更不巧的是,那几天电视新......
Converting between applets and applications
converting between applets and applicationsto convert an application to applet: create an html page with an applet tag to invoke the applet. delete the main method. alter the class header so that it extends applet rather than frame. add the import for the library class applet. change the name of the constructor method from the name of the class to init. add an invocation of a method to set the layout of widgets in the applet window.this is typically:setlayout(new borderlayout());to convert a applet to application:change the name of the init method to the name of the class. this is now the constructor method for the class. delete the word void in the header for this method, since a constructor method has no return type. alter the class header so that it extends frame rather than applet. create a new method called main, with the header public static void main(string[] args). this is now the constru...
下一页 摘要:
在jdk1.4的javax.sql包中有一个rowset接口,但是没有具体实现的类。”tiger”诞生之后,引入了javax.sql.rowset包中的五个子接口和com.sun.rowset包里面的对应的五个实现类,这样我们就可是使用功能强大的rowset了。jdk1.5中rowset的五个子接口分别是jdbcrowset,cachedrowset,webrowset,......