12 2016 档案
摘要:Annotations ___ They provide information that you need to fully describe your program, but that cannot be expressed in Java. In general the kind of an
阅读全文
摘要:Enumerated Types ___ Basic enum features When you create an enum, an associated class is produced for you by the compiler. This class is automatically
阅读全文
摘要:I/O ___ The original byte oriented library was supplemented with char oriented, Unicode based I/O classes. It’s rather important to understand the evo
阅读全文
摘要:Containers in Depth ___ Full container taxonomy You can usually ignore any class that begins with "Abstract." Filling containers This fill( ) just dup
阅读全文
摘要:Arrays ___ Why arrays are special There are three issues that distinguish arrays from other types of containers: efficiency, type, and the ability to
阅读全文
摘要:Generics ___ The term "generic" means "pertaining or appropriate to large groups of classes." While using someone else’s generic type is fairly easy,
阅读全文
摘要:Type Information ___ The need for RTTI Because it is a dynamically bound method, the proper behavior will occur even though it is called through a gen
阅读全文
摘要:Strings ___ Immutable Strings Objects of the String class are immutable. Every method in the class that appears to modify a String actually creates an
阅读全文
摘要:Error Handling with Exceptions ___ The ideal time to catch an error is at compile time, before you even try to run the program. The rest of the proble
阅读全文
摘要:Holding Your Objects ___ In general, your programs will always be creating new objects based on some criteria that will be known only at run time. You
阅读全文
摘要:Inner Classes ___ It allows you to group classes that logically belong together and to control the visibility of one within the other. It knows about
阅读全文
摘要:Polymorphism ___ Abstract classes and methods If you have an abstract class, objects of that specific class almost always have no meaning. You create
阅读全文
摘要:Polymorphism ___ The polymorphic method call allows one type to express its distinction from another, similar type, as long as they’re both derived fr
阅读全文
摘要:Reusing Classes ___ The first is composition,You’re simply reusing the functionality of the code, not its form. The second approach is inheritance,You
阅读全文
摘要:Access Control ___ A piece of work isn’t good until it’s been rewritten, often many times. Thus a primary consideration in object oriented design is t
阅读全文
摘要:Initialization & Cleanup ___ Guaranteed initialization with the constructor In Java, the class designer can guarantee initialization of every object b
阅读全文