Note of 《thinking in java》6

6.类的重用1.       所有的类都有一个toString方法。2.       后期的初始化:在载入一个类时,将所有成员都初始化为完整的对象可能会导致载入负担过大,在这种情况下应使用后期初始化:即当一个对象第一次被使用时才将它初始化。(不过这就不叫初始化了吧???)3.       在Jav...

2008-02-20 23:35:00

阅读数:984

评论数:0

Java中实现C++中的enum

以下是我开通的JAVA论坛,欢迎光临^_^http://groups.google.com/group/roofalison/browse_thread/thread/ecd6ca274fdcab8e 感谢Nubix提醒我,原来Java已经有enum了,可能我手头的书和编译器是基于1.4的,没有看...

2008-02-14 14:33:00

阅读数:2226

评论数:1

Java中final的用法总结

 1.         修饰基础数据成员的final这是final的主要用途,其含义相当于C/C++的const,即该成员被修饰为常量,意味着不可修改。如java.lang.Math类中的PI和E是final成员,其值为3.141592653589793和2.718281828459045。2. ...

2008-02-10 17:52:00

阅读数:33626

评论数:16

Note of 《thinking in java》5

5. Hiding the Implementation A primary consideration in object-oriented design is "separating the things that change from the things that sta...

2008-02-05 13:19:00

阅读数:1712

评论数:0

Note of 《thinking in java》3

3. Controlling Program Flow An rvalue is any constant, variable, or expression that can produce a value, but an lvalue must be a distinct, named v...

2008-02-05 13:18:00

阅读数:955

评论数:0

Note of 《thinking in java》4

4. Initialization & Cleanup If Tree(int) is your only constructor, then the compilor wont let you create a Tree object any other way. Each...

2008-02-05 13:18:00

阅读数:689

评论数:0

Note of 《thinking in java》2

(2). Everything is an object String can be initialized with quoted text. There are six different places to store data: registers, the stack, t...

2008-02-05 13:16:00

阅读数:491

评论数:0

Note of 《thinking in java》1

Introduction Thinking about designed, not simply coding.(1). Introduction to object Thinking of an object as a service provider. In a good ...

2008-02-05 13:15:00

阅读数:814

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭