- 博客(13)
- 资源 (10)
- 收藏
- 关注
原创 第十一章: 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 931
原创 第十一章: 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 1557
原创 第十一章: 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 975
原创 第十章: 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 862
原创 第九章: 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 978
原创 第八章: 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 1069
原创 第七章: 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 892
原创 第六章: 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 888
原创 第五章: 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 948
原创 第四章: 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 896
原创 第三章: 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 901
原创 第二章: 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 927
原创 第一章: 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 920
ajax学习帮助,不可不看
2008-12-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人