为你推荐
版权
作者
前言
Foreword
Chapter 1 Genesis of Java
1.1 Introduction
1.2 Java Development Today
1.3 Evolution of‘C’Based Programming Languages
1.4 Main Features of Java Programming Language
1.4.1 Portability
1.4.2 Simple
1.4.3 Robust
1.4.4 Multithread
1.4.5 Architecture-Neutral
1.4.6 Interpreted and High Performance
1.4.7 Distributed
1.4.8 Dynamic
1.4.9 Security
1.5 Java Applet
1.6 Exercise for you
Chapter 2 Java Overview
2.1 Concepts of OOP
2.1.1 Class
2.1.2 Object
2.1.3 Encapsulation
2.1.4 Inheritance
2.1.5 Polymorphism
2.2 More Details on Object-Oriented Programming
2.2.1 Encapsulation of Car
2.2.2 Inheritance of Car
2.2.3 Polymorphism of Car
2.2.4 Conclusion on Object-Oriented Programming
2.3 Write the First Java Program
2.4 How to Run the First Java Program
2.5 Lexical Elements
2.6 White Space
2.7 Comments
2.7.1 Single Line
2.7.2 Multi-line
2.7.3 Javadoc
2.8 Keywords
2.9 Identifiers
2.10 Java Class Library
2.11 Sample Program Practice
2.12 Exercise for you
Chapter 3 Data Types
3.1 Data Types Overview
3.2 Primitive Types
3.3 Casting
3.3.1 Widening
3.3.2 Narrowing
3.4 Reference Types
3.5 Summary
3.6 Complex Data Types
3.6.1 Reference Data Types
3.6.2 Class Types
3.6.3 Interface Types
3.7 Composite Data Types
3.7.1 Initializing Composite Data Types
3.7.2 Predefined Composite Data Types
3.8 Casting Variables to a Different Type
3.8.1 Automatic Casting
3.8.2 Explicit Casting
3.9 Java’s Floating Point Types
3.9.1 Primitive Floating Point Types
3.9.2 Integer Operators
3.9.3 Input and Output of Floating Point Values
3.9.4 Casting of Floating Point to and from Integer Values,and Floating Point Literals
3.9.5 Floating Point Operations in the Standard Packages
3.9.6 The Float Class
3.10 Variable
3.10.1 Declaring a Variable
3.10.2 Difference between Zero and‘0’-Unicode Characters
3.10.3 Initialization of the Variable
3.10.4 Error Checking by the Compiler
3.10.5 Using the Cast Operator
3.10.6 Why Declare the Variables as Type Int?
3.10.7 Shortcut Declaring Variables of the Same Type
3.10.8 Assigning Values to Variables
3.10.9 A Shortcut,Declare and Assign at the Same Time
3.11 Record
3.12 Sample Program Practice
3.13 Exercise for you
Chapter 4 Operators
4.1 Arithmetic Operators
4.1.1 The Modulus Operators
4.1.2 Arithmetic Assignment Operators
4.1.3 Increment and Decrement
4.2 Relational Operators
4.3 Boolean Logical Operators
4.4 Bitwise and Shift Operators
4.4.1 Bitwise Complement(~)
4.4.2 Bitwise AND(&)
4.4.3 Bitwise OR(|)
4.4.4 Bitwise XOR(^)
4.4.5 Left Shift(<<)
4.4.6 Signed Right Shift(>>)
4.4.7 Unsigned Right Shift(>>>)
4.5 Assignment Operators
4.6 The Conditional Operator
4.7 The Instanceof Operator
4.8 Special Operators
4.8.1 Object Member Access(.)
4.8.2 Array Element Access([])
4.8.3 Method Invocation(())
4.8.4 Object Creation(new)
4.9 Type Conversion or Casting
4.10 Sample Program Practice
4.11 Exercise for you
Chapter 5 Flowing Control
5.1 Control Statements
5.2 Selection Statements
5.2.1 If Statement
5.2.2 If-else Statement
5.2.3 Switch Statement
5.3 Repetition Statements
5.3.1 While Loop Statement
5.3.2 Do-while Loop Statement
5.3.3 For Loop Statement
5.4 Branching Statements
5.4.1 Break Statement
5.4.2 Continue Statement
5.4.3 Return Statement
5.5 Sample Program Practice
5.6 Exercise for you
Chapter 6 Class
6.1 Class Definition
6.1.1 A Simple Class Definition
6.1.2 Defining a Class
6.2 Declaring and Instantiating an Object
6.2.1 Fields and Methods
6.2.2 Default Values for Primitive Members
6.2.3 Methods,Arguments,and Return Values
6.2.4 The Argument List
6.3 Constructor
6.3.1 Calling Constructors from Constructors
6.3.2 Default Constructors
6.4 Keyword“this”
6.5 Garbage Collection
6.5.1 The Use of finalize()
6.5.2 Cleanup
6.6 Static Methods and Static Variables
6.6.1 Static Methods
6.6.2 Static Variables
6.7 Sample Examples
6.8 Exercise for you
Chapter 7 Method
7.1 Method Overloading
7.1.1 Distinguishing Overloaded Methods
7.1.2 Overloading with Primitives
7.1.3 Overloading on Return Values
7.1.4 Overriding with Constructors
7.2 Parameter Passing in Java-By Reference or By Value
7.2.1 Passing Named Arguments to Java Programs
7.2.2 Passing Information into a Method
7.2.3 Pass by Value
7.2.4 Passing Primitive Types
7.2.5 Return Values
7.2.6 Passing Object References
7.2.7 Passing Strings
7.2.8 Passing Arrays
7.3 Recursion
7.4 Controlling Access to Members of a Class
7.4.1 Class Access Level
7.4.2 Package Access Level
7.5 Static Import
7.6 Arrays
7.6.1 Array Overview
7.6.2 Java Arrays
7.7 String
7.7.1 Creating a String
7.7.2 Strings Operation
7.7.3 Alter Strings
7.8 Command Line Arguments
7.9 Sample Examples
7.10 Exercise for you
Chapter 8 Inheritance
8.1 Derived Classes
8.2 Abstract Classes
8.3 Keyword“final”
8.3.1 Final Data
8.3.2 Final Methods
8.3.3 Final Classes
8.4 Sample Example
8.5 Exercise for you
Chapter 9 Packages and Interfaces
9.1 Package
9.1.1 Packages Overview
9.1.2 Packages in Java
9.1.3 Access Specifiers
9.1.4 How to Create a Package
9.1.5 Setting Up the CLASSPATH
9.1.6 Subpackage(Package inside Another Package)
9.1.7 How to Use Package
9.2 Interface
9.2.1 Interface Overview
9.2.2 Creating and Using Interfaces
9.2.3 Defining an Interface
9.2.4 The Interface Body
9.2.5 Implementing an Interface
9.2.6 Using an Interface as a Type
9.3 Sample Example
9.4 Exercise for you
Chapter 10 Exception Handling
10.1 Definition of Exception
10.1.1 What is an Exception
10.1.2 Common Exceptions
10.1.3 The Throwable Superclass
10.1.4 Effectively Using try-catch
10.1.5 When should You Use Exceptions
10.1.6 How do You Best Use Exceptions
10.2 The Throw Statement
10.3 The Finally Statement
10.4 Runtime Exceptions
10.4.1 ArithmeticException
10.4.2 NullPointerException
10.4.3 IncompatibleClassChangeException
10.4.4 ClassCastException
10.4.5 NegativeArraySizeException
10.4.6 OutOfMemoryException
10.4.7 NoClassDefFoundException
10.4.8 IncompatibleTypeException
10.4.9 ArrayIndexOutOfBoundsException
10.4.10 UnsatisfiedLinkException
10.5 Sample Examples
10.6 Exercise for you
Chapter 11 Multithread
11.1 Multithread Overview
11.2 Synchronization
11.2.1 Inter-thread Communication
11.2.2 Java Thread Scheduling
11.2.3 Thread Priorities
11.2.4 Java Synchronization
11.3 The Life Cycle of a Thread
11.3.1 Creating a Thread
11.3.2 Starting a Thread
11.3.3 Making a Thread Not Runnable
11.3.4 Stopping a Thread
11.3.5 Testing Thread State
11.3.6 Why Pause and Resume Processes
11.4 Sample Examples
11.5 Exercise for you
Chapter 12 Input and Output
12.1 Basic Java I/O
12.1.1 Background
12.1.2 Exceptions
12.1.3 Applications
12.1.4 File Attributes
12.2 Streams
12.2.1 Byte Streams
12.2.2 Character Streams
12.2.3 Buffered Streams
12.2.4 Data Streams
12.2.5 Class StreamTokenizer
12.2.6 Class StringTokenizer
12.3 Class File
12.3.1 The PrintWriter Class
12.3.2 Constructor Method
12.3.3 File Handling and Input/Output
12.3.4 The Basic Input Output
12.4 Sample Examples
12.5 Exercise for you
Chapter 13 String Handling
13.1 The String Class
13.2 Strings in Java
13.2.1 String Basics
13.2.2 Creating a String
13.2.3 Comparing Strings
13.2.4 Other Operations
13.2.5 StringBuffer Objects
13.2.6 String Analyzing
13.3 Sample Examples
13.4 Exercise for you
Chapter 14 Networking
14.1 Computer Network Basics
14.2 URL Objects in Java
14.2.1 Creating URL Objects
14.2.2 Query Methods on URL Objects
14.2.3 Reading from a URL Connection
14.2.4 URL Operations
14.3 Sockets in Java
14.3.1 Establishing a Connection
14.3.2 The Client Side of a Socket Connection
14.3.3 Socket Operations
14.4 Sample Examples
14.5 Exercise for you
Chapter 15 Applets
15.1 Applet Overview
15.2 Life Cycle,Graphics,Fonts,Colors
15.2.1 Life Cycle of an Applet
15.2.2 Parameter Passing
15.2.3 Graphics Class
15.2.4 Font Class
15.2.5 Color Class
15.3 User Interface Components
15.4 Applet Fundamentals
15.4.1 The Applet Class
15.4.2 Applet Architecture
15.4.3 Requesting Repainting
15.5 Working with URLs and Graphics
15.6 Using the instanceof Keyword in Java
15.7 Sample Examples
15.8 Exercise for you
Chapter 16 Swing GUI Introduction
16.1 Event-Driven Programming
16.2 Event Handling
16.2.1 The Component Class
16.2.2 The Event Class
16.2.3 Event Handling for the Mouse
16.2.4 Keyboard Event Handling
16.3 Buttons,Events,and Other Swing Basics
16.3.1 Buttons
16.3.2 Action Listeners and Action Events
16.3.3 Labels
16.3.4 Color
16.4 Containers and Layout Managers
16.4.1 Border Layout Managers
16.4.2 Flow Layout Managers
16.4.3 Grid Layout Managers
16.4.4 Panels
16.4.5 The Container Class
16.5 Menus and Buttons
16.5.1 Menu Bars,Menus,and Menu Items
16.5.2 The AbstractButton Class
16.5.3 The setActionCommand Method
16.5.4 Listeners as Inner Classes
16.6 Text Fields and Text Areas
16.6.1 Text Areas and Text Fields
16.6.2 Window Listeners
16.7 Sample Examples
16.8 Exercise for you
Chapter 17 Programming with JDBC
17.1 JDBC Introduction
17.2 Connecting to the Database
17.2.1 A Simple Database Connection
17.2.2 The JDBC Classes for Creating a Connection
17.3 Basic Database Access
17.3.1 Basic JDBC Database Access Classes
17.3.2 SQL NULL versus Java null
17.3.3 Clean Up
17.3.4 Modifying the Database
17.4 SQL Data Types and Java Data Types
17.5 Scrollable Result Sets
17.5.1 Result Set Types
17.5.2 Result Set Navigation
17.6 Sample Examples
17.7 Exercise for you
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜