In this blog, 25.000 books will be uploaded, so far more than 1400 books are available. Books, will be added daily, please check this blog daily.
Saturday, January 8, 2011
Java in 60 Minutes a Day
Acknowledgments xix
About the Author xxi
Introduction xxiii
Chapter 1 Getting Started with Java 1
Why Java? 1
The Java Virtual Machine 2
The Editions of Java 4
J2SE 4
J2ME 5
J2EE 5
Downloading the Java 2 SDK 6
Installing the SDK 7
Running the SDK Tools 8
Running the javac Compiler 9
Running the JVM 10
A Simple Java Program 10
Step 1: Write the Source Code 11
Step 2: Compile the Program 13
Step 3: Run the Program 14
Summary 17
Chapter 2 Java Fundamentals 21
Java Keywords 21
Identifiers 22
Java’s Eight Primitive Data Types 23
Variables 24
Assigning Variables 25
Integral Types 27
Floating-Point Types 29
Boolean Data Type 30
Char Data Type 31
Strings 33
References versus Primitive Data 35
Constants 37
Java Operators 37
Increment and Decrement Operators 39
Assignment Operators 40
Shift Operators 40
Comparison Operators 42
Boolean Operators 43
Ternary Operator 43
Java Comments 44
Summary 46
Chapter 3 Control Structures 51
Flow of Control 51
Boolean Logic 52
The and Operator 52
The or Operator 53
The exclusive or Operator 54
The not Operator 54
Boolean Operators 55
The if Statement 57
The if/else Statement 59
The switch Statement 61
The while Loop 64
The do/while Loop 67
The for Loop 70
The break Keyword 74
The continue Keyword 76
Nested Loops 78
Summary 80
Chapter 4 Classes and Objects 85
Overview of Classes and Objects 85
Procedural Programming 86
Object-Oriented Programming 87
Object-Oriented Analysis and Design 88
Writing a Java Class 89
Adding Fields to a Class 89
Adding Methods to a Class 90
Instantiating an Object 92
Garbage Collection 94
Accessing Fields and Methods 97
Using the Dot Operator 97
Step 1: Write the Employee Class 97
Step 2: Compile the Employee Class 98
Step 3: Write the EmployeeDemo Class 98
Step 4: Compile the EmployeeDemo class 99
Step 5: Run the EmployeeDemo program 99
The this Reference 100
Summary 103
Chapter 5 Methods 107
Method Call Stack 107
Invoking Methods 108
Method Signature 111
Arguments and Parameters 113
Call-by-Value 116
Overloading Methods 121
Constructors 125
Default Constructor 128
Using Constructors 129
A Class with Multiple Constructors 130
Using this in a Constructor 131
Summary 136
Chapter 6 Understanding Inheritance 139
An Overview of Inheritance 139
The is aRelationship 144
Implementing Inheritance 145
Instantiating Child Objects 146
Single versus Multiple Inheritance 149
The java.lang.Object Class 150
The Methods of the Object Class 151
Method Overiding 154
The super Keyword 157
The final Keyword 160
final Methods 161
The Instantiation Process 162
Invoking a Parent Class Constructor 165
Summary 170
Chapter 7 Advanced Java Language Concepts 175
An Overview of Packages 175
Adding a Class to a Package 176
The Namespace Created by Packages 178
The impot Keyword 180
The Directory Structure of Packages 183
Step 1: Write and Save the Source Code for Vehicle 185
Step 2: Compile the Source Code Using the -d Flag 185
Step 3: Write the CarDealer Class 186
Step 4: Set the CLASSPATH 187
Step 5: Compile and Run the CarDealer Program 188
The Access Specifiers 190
Encapsulation 194
Benefits of Encapsulation 197
Understanding Static Members 198
Accessing Static Fields and Methods 199
Static Initializers 203
Instance Initializers 205
Summary 209
Chapter 8 Polymorphism and Abstraction 213
An Overview of Polymorphism 213
Using Parent Class References to Child Objects 214
Casting References 218
The instanceof Keyword 221
Polymorphic Parameters 225
Heterogeneous Collections 229
Virtual Methods 230
Taking Advantage of Virtual Methods 233
An Overview of Abstraction 238
Abstract Classes 239
Abstract Methods 241
Summary 247
Chapter 9 Collections 253
Arrays 253
Accessing Arrays 255
The length Attribute 255
Arrays of References 256
Array Initializers 259
Copying Arrays 261
Multidimensional Arrays 263
Example of a Heterogeneous Collection 265
Overview of the Java Collections Framework 272
The Vector Class 273
Adding Elements to a Vector 275
Accessing and Removing Elements in a Vector 277
The Hashtable Class 281
Adding Elements to a Hashtable 283
Accessing Elements in a Hashtable 285
Summary 290
Chapter 10 Interfaces 295
An Overview of Interfaces 295
Declaring Interfaces 296
User-Defined Interfaces 298
Write the Interface Source Code 299
Compile the Interface 299
Implementing an Interface 300
Write a Class That Implements Paintable 300
Save and Compile the Rectangle Class 301
Add the paint() Method 302
Write a Class That Uses Paintable 302
Using Interfaces 303
Exposing Methods via an Interface 304
Forcing Behavior on a Class 310
Declaring Fields in Interfaces 316
Extending Interfaces 317
Extending Multiple Interfaces 319
Interfaces and Polymorphism 321
Summary 326
Chapter 11 Exception Handling 329
Overview of Exception Handling 329
Flow of Control of Exceptions 330
Throwable Classes 333
Methods of the Throwable Class 333
Catching Exceptions 334
Writing try/catch Blocks 335
Multiple catch Blocks 337
Handle or Declare Rule 341
Declaring Exceptions 343
The throws Keyword 345
Throwing Exceptions 348
The finally Keyword 351
Overidden Methods and Exceptions 354
User-Defined Exceptions 357
Summary 361
Chapter 12 An Introduction to GUI Programming 367
AWT versus Swing 367
Creating Windows 369
java.awt.Frame Class 369
javax.swing.JFrame Class 372
Containers and Components 375
Adding Components to a Container 375
Layout Managers 378
FlowLayout Manager 379
BorderLayout Manager 383
Panels 385
GridLayout Manager 388
BoxLayout Manager 390
Nesting Panels 392
Using No Layout Manager 396
Summary 401
Chapter 13 GUI Components and Event Handling 405
The Delegation Model 405
The Event Listener Interfaces 407
Creating an Event Listener 409
Registering a Listener with an Event Source 410
The Event Adapter Classes 412
Buttons 417
AWT Buttons 417
Swing Buttons 418
Check Boxes 421
AWT Check Boxes 421
Swing Check Boxes 423
Radio Buttons 425
AWT Radio Buttons 425
Swing Radio Buttons 427
Labels 429
Text Components 430
AWT Text Components 430
Swing Text Components 434
Lists 437
AWT Lists 437
Swing Lists 439
Combo Boxes 440
AWT Choice 440
Swing Combo Boxes 442
Progress Bars 445
Menus 445
Summary 452
Chapter 14 Applets 457
An Overview of Applets 457
The java.applet.Applet Class 459
Swing Applets 462
Life Cycle of an Applet 465
Step 1: Write the Applet Class 467
Step 2: Write the HTML Page 468
Step 3: View the HTML Page 468
Step 4: View the Java Console 469
The applet Tag 473
Document and Code Base 478
The appletviewer Tool 479
Sandbox Security 481
The Applet Context 485
Displaying Images 488
Playing Audio 490
JAR Files and Applets 494
Summary 500
Chapter 15 Threads 503
Overview of Threads 503
Life Cycle of a Thread 506
Creating a Thread 507
Implementing Runnable 508
Extending the Thread Class 511
Methods of the Thread Class 516
Timer and TimerTask Classes 519
Scheduling Tasks 522
Multithreading Issues 526
synchronized Keyword 530
Deadlock Issues 532
Ordering Locks 534
wait() and notify() Methods 536
Summary 546
Chapter 16 Input and Output 551
An Overview of the java.io Package 551
The Output Streams 552
The Input Stream Classes 553
The Writer Class 553
The Reader Class 554
Low-Level and High-Level Streams 557
Low-Level Streams 557
High-Level Streams 559
Chaining Streams Together 561
Low-Level Readers and Writers 564
High-Level Readers and Writers 564
File I/O 565
The RandomAccessFile Class 566
Using Pipes 570
An Overview of Serialization 574
Serializing an Object 577
Deserializing an Object 578
The Logging APIs 579
An Example of Logging 581
Summary 587
Chapter 17 Network Programming 591
An Overview of Network Programming 591
Transmission Control Protocol 592
User Datagram Protocol 592
Using Sockets 594
The ServerSocket Class 596
Socket Class 599
Communicating between Sockets 600
Java Secure Socket Extension (JSSE) 602
Secure Server Socket 603
Secure Client Socket 607
Communicating over a Secure Socket 610
Overview of Datagram Packets 612
DatagramSocket Class 612
DatagramPacket Class 613
Receiving a Datagram Packet 614
Sending a Datagram Packet 615
Working with URLs 617
URLConnections 619
Summary 625
Chapter 18 Database Programming 629
An Overview of JDBC 629
JDBC Drivers 632
Connecting to a Database 633
Using the DriverManager Class 634
Using the DataSource Class 636
An SQL Primer 637
Creating Data 638
Reading Data 639
Updating Data 640
Deleting Data 641
Creating Statements 641
Simple Statements 642
Working with Result Sets 647
Navigating a Result Set 647
Viewing a Result Set 648
Updating a Result Set 651
Prepared Statements 652
Step 1: Preparing the Statement 652
Step 2: Setting the Parameters 654
Step 3: Executing a Prepared Statement 654
Callable Statements 656
Summary 663
Chapter 19 JavaBeans 669
Overview of JavaBeans 669
Simple Properties 672
Packaging a Bean 675
Step 1: Write the Bean Class 676
Step 2: Write the Manifest File 676
Step 3: Create the JAR File 677
Step 4: Download the Bean Builder 678
Step 5: Run the Bean Builder 678
Step 6: Load the Movie Bean into the Bean Builder 681
Step 7: Using the Movie Bean in the Builder Tool 681
Bound Properties 684
Step 8: Binding Properties in the Bean Builder 687
Constrained Properties 690
Vetoing an Event 693
Overview of Events 694
Step 9: Hooking up Buttons to the Movie Bean 695
Step 10: Viewing Beans in Preview Mode 696
Generating User-Defined Events 698
BeanInfo Class 703
Summary 708
Appendix About the 60 Minutes Web Site 713
Index 717
Another Programming Language Books
Another Java Books
Download
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment