图书介绍
THinking in Java (Third Edition)pdf电子书版本下载
- [美]Bruce Eckel著 著
- 出版社: 机械工业出版社
- ISBN:7111131657
- 出版时间:2005
- 标注页数:1120页
- 文件大小:35MB
- 文件页数:1146页
- 主题词:JAVA语言-程序设计-英文
PDF下载
下载说明
THinking in Java (Third Edition)PDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如 BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
WhatsInside 1
Preface 1
Preface to the 3rdedition 4
Java 2, JDK 1.4 6
Introduction 9
Prerequisites 10
Learning Java 10
Goals 11
JDK HTMLdocumentation 12
Chapters 13
Exercises 20
The CD ROM 20
Source code 22
Coding standards 24
Java versions 24
Errors 25
Note on the cover design 25
Acknowledgements 26
1: Introductionto Objects 31
The progressof abstraction 32
An objecthas an interface 34
An objectprovides services 37
The hiddenimplementation 38
Reusingthe implementation 40
Inheritance: reusingthe interface 41
ls-a vs is-like-a relationships 45
Whats InsideInterchangeable objectswith polymorphism 47
Abstract base classesand interfaces 51
Object creation,uselifetimes 51
Collections and iterators 53
The singly rooted hierarchy 55
Downcasting vstemplates/generics 56
Ensuring proper cleanup 57
Exception handling:dealing with errors 59
Concurrency 60
Persistence 61
Java and the Internet 61
What is the Web? 61
Client-side programming 64
Server-side programming 71
Applications 72
Why Java succeeds 72
Systems are easier to 72
express and understand 72
Maximal leveragewith libraries 73
Error handling 73
Programming in the large 73
Java vs C++? 74
Summary 75
2: Everythingis an Object 77
You manipulate objectsWith references 77
You must createall the objects 79
Where storage lives 79
Special case: primitive types 80
Arrays in Java 82
You never need to 83
destroy an object 83
Scoping 83
Scope of objects 84
Creating newdata types: class 85
Fields and methods 85
Methods, arguments,and return values 87
The argument list 89
Building a Java program 90
Name visibility 90
Using other components 91
The static keyword 92
Your first Java program 94
Compiling and running 95
Comments and embeddeddocumentation 97
Comment documentation 97
Syntax 98
Embedded HTML 99
Some example tags tooDocumentation example 102
Coding style 103
Summa 104
Exercises 104
3: ControllingProgram Flow 107
Using Java operators 107
Precedence lobAssignment 108
Mathematical operators 111
Auto incrementand decrement 115
Relational operators 117
Logical operators 119
Bitwise operators 122
Shift operators 123
Terna if-else operator 127
The comma operator 128
String operator + 128
Common pitfalls whenusing operators 129
Casting operators 130
Java has no “sizeof 133
Precedence revisited 133
A compendium of operators 134
Execution control 144
true and false 144
if-else 145
return 146
Iteration 147
do-while 148
for 148
break and continue 151
switch 157
Summa 162
Exercises 162
4: Initialization Cleanup 165
Guaranteed initializationwith the constructor 165
Method overloading 168
Distinguishingoverloaded methods 171
Overloading with primitives 172
Overloading on return values 177
Default constructors 178
The this keyword 179
Cleanup: finalizationand garbage collection 183
what is finalize( ) for? 184
You must perform cleanup 185
The termination condition 186
How a garbagecollector works 188
Member initialization 191
Specifying initialization 193
Constructor initialization 194
Array initialization 202
Multidimensional arrays 208
Summa 211
Exercises 212
5: Hiding theImplementation 215
package: the libra unit 216
Creating uniquepackage names 218
A custom tool libra 222
Using importsto change behavior 224
Package caveat 224
Java access speciers 224
Package access 225
public: interface access 226
private:you cant touch that! 228
protected:inheritance access 229
Interfaceand implementation 231
Class access 232
Summa 236
Exercises 237
6: Reusing Classes 241
Composition syntax 241
Inheritance syntax 245
Initializing the base class 248
Combining compositionand inheritance 250
Guaranteeing proper cleanup 252
Name hiding 256
Choosing compositionvs inheritance 258
protected 260
Incrementaldevelopment 261
Upcasting 262
Why “upcasting”? 263
The nal keyword 264
Final data 264
Final methods 269
Final classes 271
Final caution 272
Initializationand class loading 273
Initialization with inheritance 274
Summary 275
Exercises 276
7: Polymorphism 279
Upcasting revisited 279
Forgetting the object type 282
The twist 283
Method-call binding 284
Producing the right behavior 284
Extensibility 288
Pitfall: “overriding” privatemethods 292
Abstract classesand methods 293
Constructors andpolymorphism 297
order of constructor calls 298
Inheritance and cleanup 300
Behavior of polymorphicmethods inside constructors 303
Designingwith inheritance 306
Pure inheritancevs extension 308
Downcasting andrun-time type identication 310
Summary 312
Exercises 313
8: Interfaces Inner Classes 315
Interfaces 315
“Multiple inheritance” in Java 319
Extending an interfacewith inheritance 323
Grouping constants 324
Initializing eldsin interfaces 327
Nesting interfaces 328
Inner classes 331
Inner classes and upcasting 333
Inner classes in methodsand scopes 335
Anonymous inner classes 338
The link to the outer class 342
Nested classes 344
Referring to theouter class object 347
Reaching outward from amultiply-nested class 348
Inheriting from inner classes 349
Can inner classesbe overridden? 350
Local inner classes 352
Inner class identiers 354
Why inner classes? 354
ClosuresCallbacks 357
Inner classes control frameworks 360
Summary 367
Exercises 367
9: Error Handlingwith Exceptions 371
Basic exceptions 372
Exception arguments 373
Catching an exception 374
The try block 374
Exception handlers 375
Creating yourown exceptions 376
The exceptionspecication 381
Catching any exception 382
Rethrowing an exception 384
Exception chaining 388
StandardJava exceptions 392
The special case ofRuntimeException 392
Performing cleanupwith finally 394
Whats nay for? 396
Pitfall: the lost exception 399
Exception restrictions 400
Constructors 404
Exception matching 408
Alternative approaches 409
History 410
Perspeives 412
Passing exceptionsto the console 415
Converting checkedto unchecked exceptions 416
Exception guidelines 418
Summa 419
Exercises 419
10: Detecting pes 423
The need for RI 423
The Class object 426
Checking before a cast 429
RTT1 syntax 441
Reection: run timeclass information 444
A class method extractor 446
Summa 450
Exercises 451
11: Collectionsof Objects 453
Arrays 453
Arrays are rst-class objects 455
Returning an array 458
The Arrays class46o 469
Filling an array 469
Copying an array 470
Comparing arrays 472
Array element comparisons 473
Sorting an array 476
Searching a sorted array 478
Array summa 480
Introductionto containers 481
Printing containers 482
Filling containers 484
Container disadvantage:unknown type 491
Sometimes it works anyway 493
Making a type-consciousArrayList 495
Iterators 497
Container taxonomy 501
Collection functionality 505
List functionality 509
Making a stackfrom a LinkedList 513
Making a queuefrom a LinkedList 514
Set functionality 515
Sortedset 519
Map functionality 520
SortedMap 525
LinkedHashMap 527
Hashing and hash codes 529
Overriding hashCode 545
Holding references 545
The WeakHashMap 547
Iterators revisited 549
Choosingan implementation 550
Choosing between Lists 551
Choosing between Sets 554
Choosing between Maps 557
Sorting andsearching Lists 560
Utilities 561
Making a Collectionor Map unmodiable 564
Synchronizing aCollection or Map 566
Unsupported operations 567
Java 10/11 containers 570
VectorEnumeration 570
Hashtable 571
Stack 572
Bitset 573
Summa 575
Exercises 576
12: The Javal/O System 583
The File class 584
A directo lister 584
Checking for andcreating directories 588
Input and output 590
Types of InputStream 591
Types of Outputstream 593
Adding aributesand useful interfaces 594
Reading from an InputStreamwith FilterInputStream 595
Writing to an OutputStreamwith FilterOutputStream 597
Readers Writers 598
Sources and sinks of data 599
Modifying stream behavior 600
Unchanged Classes 601
Off by itself:RandomAccessFile 602
Typical usesof l/O streams 603
Input streams 605
Output streams 608
Piped streams 610
File reading writing utilities : 610
Standard l/O 612
Reading from standard input 612
Changing Systemoutto a PrintWriter 613
Redirecting standard l/O 613
New l/O 615
Converting data 619
Fetching primitives 623
View buffers 625
Data manipulationwith buers 630
Buffer details 632
Memo-mapped les 636
File locking 640
Compression 643
Simple compressionwith GZIP 644
Multile storage with Zip 645
Java ARchives (JARs) 648
Object serialization 650
Finding the class 654
Controlling serialization 656
Using persistence 665
Preferences 673
Regular expressions 675
Creating regular expressions 675
Quantifiers 677
Paern and Matcher 679
split( ) 688
Replace operations 689
reset( ) 691
Regular expressionsand Java l/O 692
Is StringTokenizer needed? 693
Summary 694
Exercises 695
13: Concurrency 699
Motivation 700
Basic threads 701
Yielding 704
Sleeping 705
Priority 708
Daemon threads 710
Joining a thread 713
Coding variations 715
Creating responsiveuser interfaces 722
Sharinglimited resources 723
Improperlyaccessing resources 723
Colliding over resources 729
Resolving sharedresource contention 731
Critical sections 738
Thread states 744
Becoming blocked 745
Cooperationbetween threads 745
Wait and notify 745
Using Pipes for l/Obetween threads 750
Mo sophisticatedcooperation 752
Deadlock 752
The proper way to stop 758
Interrupting ablocked thread 759
Thread groups 760
Summa 761
Exercises 762
14: CreatingWindows Applets 765
The basic applet 768
Applet restrictions 768
Applet advantages 769
Application frameworks 770
Running applets insidea Web browser 771
Using Appletuiewer 773
Testing applets 774
Running appletsfrom the command line 775
A display framework 777
Making a button 779
Capturing an event 780
Text areas 783
Controlling layout 785
BorderLayout 786
FIowlayout 787
Gridlayout 788
GridBagLayout 788
Absolute positioning 789
BoxLayout 789
The best approach? 793
The Swing event model 793
Event and listener types 794
Tracking multiple events 801
A catalog ofSwing components 804
Buons 805
Icons 808
Tool tips 810
Text elds 810
Borders 812
JScrolIPanes 814
A mini-editor 816
Check boxes 817
Radio buttons 819
Combo boxes(drop-down lists) 820
List boxes 821
Tabbed panes 824
Message boxes 825
Menus 827
Pop-up menus 834
Drawing 835
Dialog Boxes 838
File dialogs 843
HTML on Swing components 845
Sliders and progress bars 846
Trees 847
Tables 850
Selecting Look Feel 852
The clipboard 854
Packaging an appletinto a JAR le 857
Signing applets 858
JNLP andJava Web Start 863
Programmingtechniques 869
Binding events dynamically 870
Separating business logicfrom Ul logic 872
A canonical form 874
Concurrency Swing 875Runnable revisited 875
Managing concurrency 878
Visual programmingand JavaBeans 882
What is a JavaBean? 883
Extracting BeanInfowith the Introspector 886
A more sophisticated Bean 892
JavaBeansand synchronization 896
Packaging a Bean 9otMore complex Bean suppo 902
More to Beans 903
Summa 904
Exercises 905
15: DiscoveringProblems 909
Unit Testing 911
A Simple Testing Framework 913
JUnit 925
Improving reliabilitywith assertions 930
Asseion syntax 931
Using Assertions forDesign by Contract 934
Example: DBC +white-box unit testing 938
Building with Ant 944
Automate everything 944
Problems with make 945
Ant: the defacto standard 946
Version control with CVS 950
Daily builds 953
Logging 954
Logging Levels 956
LogRecords 959
Handlers 961
Filters 966
Formatters 968
Example: Sending emailto report log messages 969
Controlling Logging Levelsthrough Namespaces 972
Logging Practicesfor Large Pjects 974
Summa 978
Debugging 978
Debugging with JDB 978
Graphical debuggers 984
Proling and optimizing 985
Trackingmemo consumption 985
Tracking CPU usage 986
Coverage testing 986
JVM Profiling Interface 986
Using HPROF 987
Thread performance 989
Optimization guidelines 990
Doclets 991
Summa 993
Exercises 995
16: Analysisand Design 997
Methodology 997
Phase o: Make a plan 1000
The mission statement 1000
Phase 1:What are we making? 1001
Phase 2:How will we build it? 1005
Five stages of object design 1007
Guidelines forobject development 1008
Phase 3: Build the Core 1009
Phase 4:Iterate the use cases 1010
Phase 5: Evolution 1010
Plans pay o 1012
Extreme Programming 1013
Write tests first 1013
Pair programming 1015
Strategies for transition 1016
Guidelines 1017
Management obstacles 1018
Summary 1020
A: Passing Returning Objects 1021
Passing referencesaround 1022
Aliasing 1022
Making local copies 1025
Pass by value 1026
Cloning objects 1026
Adding cloneabihtyto a class 1028
Successful cloning 1030
The effect ofObjectclone( ) 1032
Cloning a composed object 1035
A deep copywith ArrayList 1038
Deep copy via serialization 1040
Adding cloneabilityfarther down a hierarchy 1042
Why this strange design? 1043
Controllingcloneability 1044
The copy constructor 1049
Read-only classes 1054
Creating read-only classes 1056
The drawbackto immutability 1057
Immutable Strings 1060
The String andStringBuer classes 1063
Strings are special 1067
Summa 1067
Exercises 1069
B: Java ProgrammingGuidelines 1071
Design 1071
Implementation 1078
C: Supplements 1085
Foundations for Javaseminar-on-CD 1085
Thinking in Javaseminar 1085
Hands-On Java seminar-on-CD 3rd edition 1086
Designing Objects Systems seminar 1086
Thinking inEnterprise Java 1087
The J2EE seminar 1088
Thinking in Paerns(with Java) 1088
Thinking in Patternsseminar 1089
Design consultingand reviews 1089
D: Resources 1091
Soware 1091
Books 1091
Analysis design 1092
Python 1095
My own list of books 1095
Index 1097
精品推荐
- Northanger Abbey(1818)
- Emma(1815)
- Sense And Sensibility(1811)
- Mansfield Park(1814)
- HUMANITIES THE EVOLUTION OF VALUES
- Pride And Drejudice(1812)
- English
- 企鹅经济学词典 经济学
- 大人的友情 河合隼雄谈友谊
- Computing Concepts
- Advanced Compilpr Design and lmplementation
- 中国商事法律要览
- Introduction to polymers
- CONFICT OF LAWS IN THE WESTERN SOCIALIST AND DEVELOPING COUNTRIES
- Measurement and Research Methods in International Marketing