java核心(卷一)第十版(无水印pdf)

所需积分/C币:22 2017-11-22 09:53:57 40.55MB PDF
收藏 收藏
举报

java 核心技术(卷一) 第十版,详细介绍了java技术的原理和基础
This page intentionally left blank Core javae Volume-fundamentals Tenth edition Cay s Horstmann 8 PRENTICE HALL Boston· Columbus· indianapolis· New York· San francisco· Amsterdam· Cape Town Dubai· London· Madrid· Milan· Munich· Paris· Montreal· Toronto· Delhi· Mexico City Sao paulo· Sidney· Hong Kong· Seoul Singapore· Taipei· Tokyo The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. no liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at corpsales@pearsoned com or(800)382-3419 Forgovernmentsalesinquiriespleasecontactgovernmentsales@pearsoned.com or questions about sales outside the United States, please contact international@pearsoned.com Visit us on the Web: informit. com /ph Library of congress cataloging-in-Publication data Names: Horstmann Cay S, 1959-author Title: Core Java/Cay S Horstmann Description: Tenth edition. I New York Prentice Hall, [2016] Includes Identifiers: LCCN 2015038763 ISBN 9780134177304 (volume 1: pbk: alk s paper)/ ISBN 0134177304(volume 1: pbk. alk paper Subjects: LCSH: Java(Computer program language) Classification: LCC QA7673 J38 H6753 2016 DDC 005.13/3-dc23 .Crecordavailableathttp://iccn.Loc.gov/2015038763 Copyrightc 2016 Oracle and/or its affiliates. All rights reserved 500 Oracle Parkway, Redwood Shores, CA94065 Portions Cay S horstmann All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms and the appropriate contacts within the Pearson education GLobalRights&permissionsdEpartmentpleasevisitwww.pearsoned.com/permissions/ Oracle America Inc does not make any representations or warranties as to the accuracy, adequacy or completeness of any information contained in this work, and is not responsible for any errors or omissions ISBN-13:978-0-13-417730-4 ISBN-10:0-13-417730-4 Text printed in the United States on recycled paper at rr Donnelley in Craw fordsville Indiana First printing, December 2015 Contents Preface ⅩX Acknowledgments XXV Chapter 1: An Introduction to Java 1. 1 Java as a Programming Platform 1. 2 The Java White Paper"Buzzwords 1.2.1 Simpl 1234 1.2.2 Object-Oriented 1.2.3 Distributed∴ 1.2.4 Robust 1.2.5 Secure∴ 1.2.6 Architecture-Neutral 1.2.7 Portable 1.2.8 Interpreted 1.2.9 High-Performance 1.2.10 Multithreaded 1.2.11 dynamic 7788 1.3 Java Applets and the Internet 14 A Short History of java…… 110 1.5 Common Misconceptions about Java…… 13 Chapter 2: The Java Programming Environment 2.1 Installing the Java Development Kit 788 211 Downloading the JDK……… 2.1.2 Setting up the JDK 20 213 Installing Source Files and Documentation………… 2.2 Using the Command-Line Tools 23 2.3 Using an Integrated development environment 24 Running a Graphical Application…………… 2.5 Building and running applets…… 33 Contents Chapter 3: Fundamental Programming Structures in Java 41 3.1 A Simple Java Program 42 3.2 Comments 46 3.3 Data typ 47 33.1 Integer Types………… 47 33.2 Floating-Point Types…… 48 3.3.3 The ch 50 3.3.4 Unicode and the char Type 3. 3.5 The boolean Type 52 3.4 Variables∴ 3.4.1 Initializing variables 54 3.4.2 Constants 55 3 Operators 56 3.5. 1 Mathematical Functions and Constants 57 3.5.2 Conversions between Numeric Types............. 59 3.5.3 Casts 354 Combining assignment with Operators……………………61 3.5.5 Increment and decrement Operators..............61 3.56 Relational and boolean Operators………… 62 3.5.7 Bitwise Operators 63 3.5.8 Parentheses and Operator hierarchy 64 3.5.9 Enumerated Type .65 3.6 Strings……………… .65 3.6.1 Substrings 66 3.6.2 Concatenation 66 3.6.3 Strings are Immutable 67 3.6.4 Testing Strings for Equality 68 3.6.5 Empty and Null Strings 3.6.6 Code points and code units .....................................................70 3.6.7 The String API ·。· 71 368 Reading the Online API Documentation………… 74 369 Building Strings……………… 77 3.7 Input and output 78 3.7.1 Reading input 3.7.2 Formatting output 82 Contents 373 File Input and Output……….87 3. 8 Control flow 3.8.1 Block Scope 3.8.2 Conditional Statements 3.8.3 Lo 94 384 Determinate Loops……… 99 3.8.5 Multiple selections--The switch Statement 1103 3.8.6 Statements That break control flow…… 106 39 Big Numbers……… 108 3.10 Arrays 3.10.1he“ for eacl h"Loop… 113 3.10.2 Array Initializers and Anonymous arrays 114 3.10.3 Array Copying 114 3.10.4 Command-Line parameters 3.10.5 Array Sorting 3.10.6 Multidimensional Arrays 120 3.10.7 Ragged arrays 124 Chapter4: Objects and classes………………….,…………………129 4.1 Introduction to Object-Oriented progi g 4.1.1 Classes… 131 4.1.2 Objects 132 4.13 Identifying Classes…… …133 4.1. 4 Relationships between Classes ...... ∴….133 4. 2 USing Predefined Classes 135 4.2.1 Objects and object variables 422 The LocalDate Class of the Java Library……… 4.2.3 Mutator and Accessor Methods 141 4.3 Defining Your Own Classes .145 4.3.1 An Employee Class....... ….145 4.3.2 Use of multiple source Files................ 149 4.3.3 Dissecting the Employee Class…… 149 4.34 First Steps with Constructors……… 150 4.3.5 Implicit and Explicit parameters 152 4.3.6 Benefits of Encapsulation 153 4.3.7 Class-Based Access privileges 156 vII Contents 4.3. 8 Private Methods 156 4.3.9 Final Instance Fields 2157 4.4 Static Fields and Methods 158 4.4.1 Static Fields 158 4.4.2 Static Constants ∴159 4.4.3 Static Methods∴ 160 4.4.4 Factory Methods ∴161 4.4.5 The main Method 161 4.5 Method Parameters ∴164 4.6 Object Construction 171 4.6.1 Overloading… 172 4.6.2 Default field Initialization 172 4.6.3 The Constructor with No arguments 173 4.6.4 Explicit Field Initialization 1174 4.6.5 Parameter Names 175 4.6.6 Calling Another Constructor 176 4.6.7 Initialization blocks 177 4.6.8 Object Destruction and the finalize Method………181 4.7 Packages…… 182 4.7.1 Class Importation 183 4.7.2 Static Imports 185 473 Addition of a Class into a Package…………………185 4.7.4 Package Scope 189 4.8 The Class path 190 4.8.1 Setting the Class Path 193 4.9 Documentation comments ..194 4.9.1 Comment Insertion ..194 4.9.2 Class Comments...........................195 4.9.3 Method Comments 195 4.9.4 Field comments ∴196 4.9.5 General Comments 196 4.96 Package and Overview Comments………….198 4.9.7 Comment extraction …198 4.10 Class design hints g 200 Contents Chapter 5: Inheritance …203 5.1 Classes Superclasses and subclasses 204 5.1.1 Defining Subclasses 204 5.1.2 Overriding methods 206 5.1.3 Subclass constructors 207 5.1.4 Inheritance hierarchies 212 5.15 Polymorphism……… 213 5.1.6 Understanding method calls 214 5.1.7 Preventing Inheritance: Final Classes and Methods 217 5.1.8 Casting… 219 5.1.9 Abstract Classes 221 5.1.10 Protected access 227 5.2 Object: The Cosmic Superclass .228 5.2.1 The equals Method 229 5.2.2 Equality Testing and Inheritance 231 5.2.3 The hashCode Method 235 5.2.4 The toString Method 238 5.3 Generic array lists 244 5.3.1 Accessing array list elements 247 5.3.2 Compatibility between Typed and Raw Array Lists .......251 5.4 Object Wrappers and Autoboxing .252 5.5 Methods with a Variable number of parameters 256 5.6 Enumeration Classes ∴….258 5.7 Reflection ∴260 5.7.1 The Class Class ∴…261 5.7.2 A Primer on Catching Exceptions ∴.263 5.7.3 USing reflection to analyze the capabilities of classes .. 265 5.7.4 Using reflection to analyze objects at runtime...... 271 57 Using Reflection to Write generic array Code………….276 5.7.6 Invoking arbitrary Methods 5.8 Design Hints for Inheritance 283 Chapter6: interfaces, Lambda Expressions, and inner classes………287 6.1 Interfaces 288 6. 1.1 The Interface Concept. 288

...展开详情
试读 127P java核心(卷一)第十版(无水印pdf)
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    一个资源只可评论一次,评论内容不能少于5个字
    hesterr 英文版的,确实很清晰
    2017-12-17
    回复
    img
    jwh5566

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    java核心(卷一)第十版(无水印pdf) 22积分/C币 立即下载
    1/127
    java核心(卷一)第十版(无水印pdf)第1页
    java核心(卷一)第十版(无水印pdf)第2页
    java核心(卷一)第十版(无水印pdf)第3页
    java核心(卷一)第十版(无水印pdf)第4页
    java核心(卷一)第十版(无水印pdf)第5页
    java核心(卷一)第十版(无水印pdf)第6页
    java核心(卷一)第十版(无水印pdf)第7页
    java核心(卷一)第十版(无水印pdf)第8页
    java核心(卷一)第十版(无水印pdf)第9页
    java核心(卷一)第十版(无水印pdf)第10页
    java核心(卷一)第十版(无水印pdf)第11页
    java核心(卷一)第十版(无水印pdf)第12页
    java核心(卷一)第十版(无水印pdf)第13页
    java核心(卷一)第十版(无水印pdf)第14页
    java核心(卷一)第十版(无水印pdf)第15页
    java核心(卷一)第十版(无水印pdf)第16页
    java核心(卷一)第十版(无水印pdf)第17页
    java核心(卷一)第十版(无水印pdf)第18页
    java核心(卷一)第十版(无水印pdf)第19页
    java核心(卷一)第十版(无水印pdf)第20页

    试读已结束,剩余107页未读...

    22积分/C币 立即下载 >