وبلاگ بلیان

Java Precisely (MIT Press)

معرفی کتاب «Java Precisely (MIT Press)» نوشتهٔ Sestoft, Peter، منتشرشده توسط نشر MIT Press; The MIT Press در سال 2005. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Java Precisely (MIT Press)» در دستهٔ بدون دسته‌بندی قرار دارد.

This concise guide to the Java programming language, version 5.0, offers a quick reference for the reader who wants to know the language in greater detail than that provided by the standard text or language reference book. It presents the entire Java programming language and essential parts of the class libraries -- the collection classes and the input-output classes. The second edition adds material on autoboxing of primitive types, string formatting, variable-arity methods, the enhanced for statement, enum types, generic types and methods, reflection, and meta-data annotations. It has been updated throughout to reflect the changes from Java 1.4 to Java 5.0. The final section summarizes and illustrates the new features of Java 5.0 and compares them to the C# programming language. General rules are shown on left-hand pages and corresponding examples on right-hand pages. All examples are fragments of legal Java programs and the complete ready-to-run example programs can be found at the book's Web site, http://www.dina.kvl.dk/~sestoft/javaprecisely/. Front Matter 1 Preface 3 Table of Contents 4 1. Running Java: Compilation, Loading, and Execution 8 2. Names and Reserved Names 9 3. Java Naming Conventions 10 4. Comments and Program Layout 11 5. Types 13 5.1 Primitive Types 13 5.2 Reference Types 13 5.3 Array Types 13 5.4 Boxing: Wrapping Primitive Types as Reference Types 13 5.5 Subtypes and Compatibility 15 5.6 Signatures and Subsumption 15 5.7 Type Conversion 15 6. Variables, Parameters, Fields, and Scope 17 6.1 Values Bound to Variables, Parameters, or Fields 17 6.2 Variable Declarations 17 6.3 Scope of Variables, Parameters, and Fields 17 7. Strings 19 7.1 String Formatting Java 5.0 21 7.1.1 Formatting of Numeric, Character, and General Types 21 7.1.1.1 Some Integer Formatting Specifiers and Their Effect 22 7.1.1.2 Some Floating-Point Number Formatting Specifiers and Their Effect 22 7.1.2 Formatting of Dates and Times 23 7.1.2.1 Some Date and Time Formatting Specifiers and Their Effect 24 8. Arrays 25 8.1 Array Creation and Access 25 8.2 Array Initializers 25 8.3 Multidimensional Arrays 27 8.4 The Utility Class Arrays 27 9. Classes 29 9.1 Class Declarations and Class Bodies 29 9.2 Top-Level Classes, Nested Classes, Member Classes, and Local Classes 29 9.3 Class Modifiers 29 9.4 The Class Modifiers public, final, abstract 31 9.5 Subclasses, Superclasses, Class Hierarchy, Inheritance, and Overriding 31 9.6 Field Declarations in Classes 33 9.7 The Member Access Modifiers private, protected, public 33 9.8 Method Declarations 35 9.9 Parameter Arrays and Variable-Arity Methods Java 5.0 37 9.10 Constructor Declarations 37 9.11 Nested Classes, Member Classes, Local Classes, and Inner Classes 39 9.12 Anonymous Classes 39 9.13 Initializer Blocks, Field Initializers, and Initializers 39 10. Classes and Objects in the Computer 41 10.1 What is a Class? 41 10.2 What is an Object? 41 10.3 Inner Objects 41 11. Expressions 43 11.1 Table of Expression Forms 43 11.2 Arithmetic Operators 45 11.3 Logical Operators 45 11.4 Bitwise Operators and Shift Operators 45 11.5 Assignment Expressions 47 11.6 Conditional Expressions 47 11.7 Object Creation Expressions 47 11.8 Instance Test Expressions 47 11.9 Field Access Expressions 49 11.10 The Current Object Reference this 49 11.11 Type Cast Expression 49 11.12 Method Call Expressions 51 11.12.1 Method Call: Parameter Passing 51 11.12.2 Method Call: Determining which Method is Called 53 11.12.2.1 At Compile-Time: Determine the Target Type and Signature 53 11.12.2.2 At Run-Time: Determine the Target Object if Non-Static and Execute the Method 53 12. Statements 55 12.1 Expression Statements 55 12.2 Block Statements 55 12.3 The Empty Statement 55 12.4 Choice Statements 57 12.4.1 The if Statement 57 12.4.2 The if-else Statement 57 12.4.3 The switch Statement 57 12.5 Loop Statements 59 12.5.1 The for Statement 59 12.5.2 Using the for Statement on Iterables Java 5.0 59 12.5.3 The while Statement 61 12.5.4 The do-while Statement 61 12.6 Returns, Labeled Statements, Exits, and Exceptions 63 12.6.1 The return Statement 63 12.6.2 Labeled Statements 63 12.6.3 The break Statement 63 12.6.4 The continue Statement 63 12.6.5 The throw Statement 65 12.6.6 The try-catch-finally Statement 65 12.7 The assert Statement 67 13. Interfaces 69 13.1 Interface Declarations 69 13.2 Classes Implementing Interfaces 69 14. Enum Types Java 5.0 71 15. Exceptions, Checked and Unchecked 73 16. Threads, Concurrent Execution, and Synchronization 75 16.1 Threads and Concurrent Execution 75 16.2 Locks and the synchronized Statement 77 16.3 Operations on Threads 79 16.4 Operations on Locked Objects 79 17. Compilation, Source Files, Class Names, and Class Files 81 18. Packages and Jar Files 82 19. Mathematical Functions 84 20. String Builders and String Buffers 86 21. Generic Types and Methods Java 5.0 88 21.1 Generics: Safety, Generality, and Efficiency 88 21.2 Generic Types, Type Parameters, and Type Instances 88 21.3 How Can Type Instances Be Used? 88 21.4 Generic Classes 90 21.5 Constraints on Type Parameters 92 21.6 How Can Type Parameters Be Used? 92 21.7 Generic Interfaces 94 21.8 Generic Methods 96 21.9 Wildcard Type Arguments 98 21.10 The Raw Type 100 21.11 The Implementation of Generic Types and Methods 100 22. Generic Collections and Maps Java 5.0 102 22.1 Interface Collection
دانلود کتاب Java Precisely (MIT Press)