04/08/2008 (week 1)
overloaded methods can have the same name but must have different parameter lists.
----------------
to use finalize( ), it gives you the ability to perform some important cleanup at the time of garbage collection.
finalize( ) can be used for verification of the termination condition of an object.
----------------
Casting from a derived type to a base type moves up on the inheritance diagram, so it’s commonly referred to as upcasting. Upcasting is always safe because you’re going from a more specific type to a more general type.
----------------
With a primitive, final makes the value a constant, but with an object reference, final makes the reference a constant. Once the reference is initialized to an object, it can never be changed to point to another object. However, the object itself can be modified.
In all cases, the blank final must be initialized before it is used, and the compiler ensures this.
Java allows you to make arguments final by declaring them as such in the argument list. This means that inside the method you cannot change what the argument reference points to.
***********************************
20/08/08 (Week 2)
All method binding in Java uses late binding unless a method has been declared final.
When using composition and inheritance to create a new class, most of the time you won’t have to worry about cleaning up—subobjects can usually be left to the garbage collector.
And with inheritance, you must override dispose( ) in the derived class if you have any special cleanup that must happen as part of garbage collection. When you override dispose( ) in an inherited class, it’s important to remember to call the base-class version of dispose( ), since otherwise the base-class cleanup will not happen.
a good guideline for constructors is, “Do as little as possible to set the object into a good state, and if you can possibly avoid it, don’t call any methods.” The only safe methods to call inside a constructor are those that are final in the base class. (This also applies to private methods, which are automatically final.)
25/08/08 (Week 3)
When designing with inheritance, a general guideline is “Use inheritance to express differences in behavior, and fields to express variations in state.”
* haven't read nesting interface and inner class parts.
分享到:
相关推荐
根据提供的文件信息,以下是对文件《Thinking in Java 4th Edition Annotated Solutions Guide》中所包含知识点的详细解释: 首先,文件标题《Thinking in Java 4th Edition Annotated Solutions Guide》指出了这是...
《Thinking in Java》第四版由布鲁斯·埃克尔(Bruce Eckel)撰写,他是MindView公司的总裁。这本书被广泛认为是学习Java编程语言的经典教材之一。从读者的反馈来看,《Thinking in Java》不仅覆盖了Java的核心概念...
《Thinking in Java》是Bruce Eckel的经典之作,第四版(TIJ4)更是Java程序员必读的书籍之一。这本书深入浅出地介绍了Java语言的核心概念和技术,包括面向对象编程、集合框架、多线程、网络编程等众多主题。源码是...
研讨课 Hands-on Java研讨课CD Thinking in Objects研讨课 Thinking in Enterprise Java Thinking in Patterns(with Java) Thinking in Patterns研讨课 设计咨询与复审 附录B 资源 软件 编辑器与IDE 书籍 分析与设计...
《Thinking in Java》是Bruce Eckel的经典之作,它深入浅出地介绍了Java语言的核心概念和技术。这本书的练习题是学习Java的重要组成部分,因为它们能够帮助读者巩固理论知识并提升实践能力。以下是对"Thinking in ...
《Thinking in Java》是Bruce Eckel的经典之作,第四版涵盖了Java编程语言的广泛主题,适合初学者和有经验的程序员。这本书深入浅出地讲解了Java的核心概念和技术,旨在帮助读者建立坚实的编程基础,并理解面向对象...
《Thinking in Java》是Bruce Eckel的经典之作,被誉为学习Java编程的权威指南。该书以其深入浅出的方式,详尽地介绍了Java语言的核心概念和技术。第三版是此书的一个重要里程碑,它涵盖了Java语言的诸多关键特性,...
《Thinking in Java》是一本备受推崇的Java编程教材,由Bruce Eckel撰写,被誉为Java学习者的必读之作。这本书深入浅出地介绍了Java语言的核心概念和技术,覆盖了从基础到高级的主题,对于有一定Java基础的读者来说...
《Thinking in Java》是Bruce Eckel的经典之作,第四版更是被广大Java开发者视为学习和进阶的重要参考书籍。这本书深入浅出地介绍了Java语言的核心概念和技术,包括面向对象编程、集合框架、多线程、网络编程、GUI...
《Thinking in Java》第二版是Bruce Eckel所著的一本权威性的Java编程教程,由MindView, Inc.出版。这本书受到了读者的高度评价,被认为是比其他Java书籍更出色的学习资源,其深度、完整性和精确性都是同类书籍中的...
《Thinking in Java》是Bruce Eckel的经典编程教材,它深入浅出地介绍了Java语言的核心概念和技术。这本书以其详尽的解释、丰富的示例和实践性强的习题深受程序员喜爱。"Thinking in Java 习题答案"是配套的解答集,...
《Thinking in Java》是 Bruce Eckel 编著的一本经典的Java编程教材,它深受程序员喜爱,被誉为学习Java的必备参考书。这本书全面深入地探讨了Java语言的核心概念和技术,不仅适合初学者,也对有经验的程序员提供了...
《Thinking in Java》是Bruce Eckel的经典Java编程教材,它以其深入浅出的讲解和全面系统的内容深受程序员喜爱。这本书的Annotated Solution Guide是作者为读者提供的配套解答指南,帮助读者理解和解决书中练习题,...
《Thinking in Java》是Bruce Eckel的经典Java编程书籍,它深入浅出地讲解了Java语言的核心概念和技术。这本书不仅适合初学者,也对有经验的程序员提供了深入理解Java的宝贵资源。现在,我们有机会免费下载这本书的...
Thinking In Java-Java 编程思想(中英文版 第四版) Thinking In Java-Java 编程思想(中英文版 第四版)
Thinking in java java核心思想英文版(带目录),学java必备
他是《Thinking in Java》、《Thinking in C++》、《C++ Inside & Out》《Using C++》和《Thinking in Patterns》的作者,同时还是《Black Belt C++》文集的编辑。他的《Thinking in C++》一本书在1995年被评为...
《Thinking in Java》是Bruce Eckel的经典之作,它被誉为学习Java编程的最佳教材之一。这本书以其深入浅出的讲解方式和全面覆盖的Java知识点而受到广大程序员的推崇。本压缩包包含的是《Thinking in Java》的第三版...