Java語言導學(第4版)(英文版)

內容介紹

本書是Sun公司指定Java教程的最新版。書中除了講解面向對象的編程概念、語言基礎、類和對象、接口和繼承、包、數字和字元串、異常、基本I/O、集合、並發、Swing、把程式打包到JAR檔案中、applet之外,還介紹了Java Web Start、平台環境和正則表達式,同時涵蓋了Java 5.0和6.0引入的新特性,比如泛型和並發、註解。附錄B中還給出如何準備Java程式語言認證考試方面的內容。此外,本書配套的網上資源還包含本書的示例以及問題和練習的答案、線上Java SE指南、Java SE開發工具包(Java SE Development Kit,JDK)、相應的API規範和指導文檔等。

作品目錄

Chapter 1 Getting StartedThe Java Technology Phenomenon About the Java Technology What Can Java Technology Do? How Will Java Technology Change My Life?The “Hello World!” Application “Hello World!” for the NetBeans IDE “Hello World!” for Microsoft Windows “Hello World!” for Solaris OS and LinuxA Closer Look at the “Hello World!” Application Source Code Comments The HelloWorldApp Class Definition The main MethodCommon Problems (and Their Solutions) Compiler Problems Runtime ProblemsQuestions and Exercises: Getting Started Chapter 2 Object-Oriented Programming ConceptsWhat Is an Object?What Is a Class?What Is Inheritance?What Is an Interface?What Is a Package?Questions and Exercises: Object-Oriented Programming ConceptsChapter 3 Language BasicsVariables Naming Primitive Data Types Arrays Summary of Variables Questions and Exercises: VariablesOperators Assignment, Arithmetic, and Unary Operators Equality, Relational, and Conditional Operators Bitwise and Bit Shift Operators Summary of Operators Questions and Exercises: OperatorsExpressions, Statements, and Blocks Expressions Statements Blocks Questions and Exercises: Expressions, Statements, and BlocksControl Flow Statements The if-then and if-then-else Statements The switch Statement The while and do-while Statements The for Statement Branching Statements Summary of Control Flow Statements Questions and Exercises: Control Flow Statements Chapter 4 Classes and Objects   Classes Declaring Classes Declaring Member Variables Defining Methods Providing Constructors for Your ClassesPassing Information to a Method or a ConstructorObjects Creating Objects Using ObjectsMore on Classes Returning a Value from a Method Using the this Keyword Controlling Access to Members of a Class Understanding Instance and Class Members Initializing Fields Summary of Creating and Using Classes and Objects Questions and Exercises: Classes Questions and Exercises: ObjectsNested Classes Why Use Nested Classes? Static Nested Classes Inner Classes Inner Class Example Summary of Nested Classes Questions and Exercises: Nested ClassesEnum Types Questions and Exercises: Enum TypesAnnotations Documentation Annotations Used by the Compiler Annotation Processing Questions and Exercises: Annotations Chapter 5 Interfaces and InheritanceChapter 6 Generics Chapter 7 Packages Chapter 8 Numbers and Strings Chapter 9 Exceptions Chapter 10 Basic I/O Chapter 11 Collections Chapter 12 Concurrency Chapter 13 Regular Expressions Chapter 14 The Platform Environment Chapter 15 Swing Chapter 16 Packaging Programs in JAR Files Chapter 17 Java Web Start Chapter 18 Applets Appendix A Java Language Keywords Appendix B Preparation for Java Programming Language Certification Index

相關詞條

熱門詞條

聯絡我們