
ThinkingInJava 3学习笔记
文章平均质量分 78
xiong2009
这个作者很懒,什么都没留下…
展开
-
第三章: Controlling Program Flow
第三章: Controlling Program Flow1、Mathematical operators(数学运算符) addition (+), subtraction (-), division (/), multiplication (*) and modulus (%, which produces the remainder from integer division). Intege原创 2005-12-06 18:09:00 · 932 阅读 · 0 评论 -
第十一章: Collections of Objects--(1.数组)
第十一章: Collections of Objects数组部分 the Java utilities library has a reasonably complete set of container classes1、Arrays There are three issues that distinguish arrays f原创 2005-12-15 13:48:00 · 1026 阅读 · 0 评论 -
第十章: Detecting Types
第十章: Detecting Typesrun-time type identification (RTTI) 运行时类型识别-- It lets you find the exact type of an object when you have only a reference to the base type. This takes two forms: “Traditional” RTTI原创 2005-12-13 18:35:00 · 900 阅读 · 0 评论 -
第十一章: Collections of Objects (2.2 容器类续)
9)Map functionalityMap (interface)Maintains key-value associations (pairs) so you can look up a value using a key.HashMap*Implementation based on a hash table. (Use this instead of Hashtable.) Provide原创 2005-12-16 14:39:00 · 975 阅读 · 0 评论 -
第八章: Interfaces & Inner Classes
第八章: Interfaces & Inner Classes 1、 Interfaces interface Instrument { // Compile-time constant: int I = 5; // static & final // Cannot have method definitions:原创 2005-12-09 18:30:00 · 1135 阅读 · 0 评论 -
第四章: Initialization & Cleanup
第四章: Initialization & Cleanup: 1、Guaranteed initialization with the constructor the coding style of making the first letter of all methods lowercase does not apply to constructors, since t原创 2005-12-07 18:29:00 · 941 阅读 · 0 评论 -
第二章: Everything is an Object
第二章: Everything is an Object:1、Where storage lives:Registers. The stack. The heap. Static storage. Constant storage. Non-RAM storage. 2、Special case: primitive typesPrimitive typeSizeMinimumMaximumW原创 2005-12-06 15:42:00 · 973 阅读 · 0 评论 -
第一章: Introduction to Objects
第一章: Introduction to Objects:1、a pure approach to object-oriented programming:Everything is an object. A program is a bunch of objects telling each other what to do by sending messages.Each object has原创 2005-12-06 12:41:00 · 970 阅读 · 0 评论 -
第九章: Error Handling with Exceptions
第九章: Error Handling with Exceptions-- badly formed code will not be run当发生异常的时侯,它会跳出当前的运行环境,把问题交给上一层运行环境。另外异常机制让程序的执行代码和错误处理代码分离,增强了程序的可读性和维护性。1、 Basic exceptions if(t == null)原创 2005-12-13 16:37:00 · 1018 阅读 · 0 评论 -
第七章: Polymorphism
第七章: Polymorphism1、 Upcasting revisited--Taking an object reference and treating it as a reference to its base type.(通过绑定来实现多态的方法调用)Method-call binding方法调用的绑定,分前绑定和后绑定--early binding(When binding is原创 2005-12-09 11:32:00 · 936 阅读 · 0 评论 -
第六章: Reusing Classes
第六章: Reusing Classesuse the classes without soiling the existing code—composition and inheritance(合成与继承—has a 与is a ) 1、 Inheritance class Cleanser { public vo原创 2005-12-08 16:28:00 · 926 阅读 · 0 评论 -
第五章: Hiding the Implementation
第五章: Hiding the Implementation:1、package: the library unitpackage mypackage;Note that the convention for Java package names is to use all lowercase letters, even for intermediate words.Creating unique原创 2005-12-08 12:01:00 · 973 阅读 · 0 评论 -
第十一章: Collections of Objects (2.1容器类)
3)Introduction to containers The Java 2 container library takes the issue of “holding your objects” and divides it into two distinct concepts: a、 Collection: a group of individual elements原创 2005-12-15 21:05:00 · 1634 阅读 · 0 评论