- 博客(8)
- 资源 (5)
- 收藏
- 关注
翻译 [书摘]Polymorphism first, RTTI second
RTTI allows you to discover type information from an anonymous base-class reference. Thus, it’s ripe for misuse by the novice, since it might make sense before polymorphic method calls do. Putting a
2006-03-28 16:38:00 1057
原创 [总结]初始化过程浅析
1. 加载类(所有的成员变量,无论是否是静态的,都赋了一个默认值)2. 初始化静态成员变量3. 初始化非静态类成员变量4. 调用该类的构造器 这是每个类的初始化过程。整个程序的初始化过程,是一个类一个类的完成的;其中,可能加载某个类,但是并没有产生它的实例,也就是说,执行了前两步,但是没有执行3,4步。 示例程序:class
2006-03-28 15:06:00 1313
翻译 [书摘]Issues about RTTI (Run Time Type Identification)
class Test2{ static { System.out.println("Loading Test2 ..."); } }public class Test { static { System.out.println("Loading Test ..."); }public static void main(String[] args) { Object[] obj
2006-03-28 10:14:00 1057
翻译 [书摘]使用Nested class进行代码测试
Earlier in this book I suggested putting a main( ) in every class to act as a test bed for that class. One drawback to this is the amount of extra compiled code you must carry around. If this is a pro
2006-03-23 09:52:00 923
翻译 [书摘]Cleanup Issues
class Characteristic { private String s; Characteristic(String s) { this.s = s; System.out.println("Creating Characteristic " + s); } protected void dispose() { System.out.println("finali
2006-03-21 11:22:00 1764 1
原创 DOS Command中,for 和 shift的用法示例
-------------------------------------------save as doscmd.bat----------------------------------@echo off@echo *******echo ***遍历当前文件夹所有扩展名为.txt的文档,将“当前路径+每个txt文件名”依次作为参数,call bat2.bat***FOR %%I
2006-03-16 16:31:00 2780
原创 sth about Inheritance
public class Test extends Test2{ Test(String s) { System.out.println(s); }public static void main(String[] args) { Test t=new Test("Test"); }} class Test2{ Test2(String s) { System.out.print
2006-03-14 16:31:00 1107
原创 Oracle数据库之间的数据转移
create database link MyLinkconnect to scott identified by "tiger"using MyInstance/*to fill a local talbe using the data selected from another database linked with this */insert into emp select *
2006-03-03 17:27:00 1071
Packt.Publishing.EJB.3.Developer.Guide.May.2008
2011-07-12
Apress.Pro.EJB.3.Java.Persistence.API.May.2006
2011-07-12
Apress.Beginning.EJB.3.Application.Development.Sep.2006
2011-07-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人