15. Java in 60 Minutes a Day

    Author: Myanmar Ebook Store Genre: »
    Rating

    Chapter 1 Getting Started with Java
    Why Java?
    The Java Virtual Machine
    The Editions of Java
    J2SE
    J2ME
    J2EE
    Downloading the Java 2 SDK
    Installing the SDK
    Running the SDK Tools
    Running the javac Compiler
    Running the JVM
    A Simple Java Program
    Step 1: Write the Source Code
    Step 2: Compile the Program
    Step 3: Run the Program
    Summary

    Chapter 2 Java Fundamentals
    Java Keywords
    Identifiers
    Java’s Eight Primitive Data Types
    Variables
    Assigning Variables
    Integral Types
    Floating-Point Types
    Boolean Data Type
    Char Data Type
    Strings
    References versus Primitive Data
    Constants
    Java Operators
    Increment and Decrement Operators
    Assignment Operators
    Shift Operators
    Comparison Operators
    Boolean Operators
    Ternary Operator
    Java Comments
    Summary

    Chapter 3 Control Structures
    Flow of Control
    Boolean Logic
    The and Operator
    The or Operator
    The exclusive or Operator
    The not Operator
    Boolean Operators
    The if Statement
    The if/else Statement
    The switch Statement
    The while Loop
    The do/while Loop
    The for Loop
    The break Keyword
    The continue Keyword
    Nested Loops
    Summary

    Chapter 4 Classes and Objects
    Overview of Classes and Objects
    Procedural Programming
    Object-Oriented Programming
    Object-Oriented Analysis and Design
    Writing a Java Class
    Adding Fields to a Class
    Adding Methods to a Class
    Instantiating an Object
    Garbage Collection
    Accessing Fields and Methods
    Using the Dot Operator
    Step 1: Write the Employee Class
    Step 2: Compile the Employee Class
    Step 3: Write the EmployeeDemo Class
    Step 4: Compile the EmployeeDemo class
    Step 5: Run the EmployeeDemo program
    The this Reference
    Summary

    Chapter 5 Methods
    Method Call Stack
    Invoking Methods
    Method Signature
    Arguments and Parameters
    Call-by-Value
    Overloading Methods
    Constructors
    Default Constructor
    Using Constructors
    A Class with Multiple Constructors
    Using this in a Constructor
    Summary

    Chapter 6 Understanding Inheritance
    An Overview of Inheritance
    The is aRelationship
    Implementing Inheritance
    Instantiating Child Objects
    Single versus Multiple Inheritance
    The java.lang.Object Class
    The Methods of the Object Class
    Method Overriding
    The super Keyword
    The final Keyword
    final Methods
    The Instantiation Process
    Invoking a Parent Class Constructor
    Summary

    Chapter 7 Advanced Java Language Concepts
    An Overview of Packages
    Adding a Class to a Package
    The Namespace Created by Packages
    The import Keyword
    The Directory Structure of Packages
    Step 1: Write and Save the Source Code for Vehicle
    Step 2: Compile the Source Code Using the -d Flag
    Step 3: Write the CarDealer Class
    Step 4: Set the CLASSPATH
    Step 5: Compile and Run the CarDealer Program
    The Access Specifiers
    Encapsulation
    Benefits of Encapsulation
    Understanding Static Members
    Accessing Static Fields and Methods
    Static Initializers
    Instance Initializers
    Summary

    Chapter 8 Polymorphism and Abstraction
    An Overview of Polymorphism
    Using Parent Class References to Child Objects
    Casting References
    The instanceof Keyword
    Polymorphic Parameters
    Heterogeneous Collections
    Virtual Methods
    Taking Advantage of Virtual Methods
    An Overview of Abstraction
    Abstract Classes
    Abstract Methods
    Summary
    Chapter 9 Collections
    Arrays
    Accessing Arrays
    The length Attribute
    Arrays of References
    Array Initializers
    Copying Arrays
    Multidimensional Arrays
    Example of a Heterogeneous Collection
    Overview of the Java Collections Framework
    The Vector Class
    Adding Elements to a Vector
    Accessing and Removing Elements in a Vector
    The Hashtable Class
    Adding Elements to a Hashtable
    Accessing Elements in a Hashtable
    Summary

    Chapter 10 Interfaces
    An Overview of Interfaces
    Declaring Interfaces
    User-Defined Interfaces
    Write the Interface Source Code
    Compile the Interface
    Implementing an Interface
    Write a Class That Implements Paintable
    Save and Compile the Rectangle Class
    Add the paint() Method
    Write a Class That Uses Paintable
    Using Interfaces
    Exposing Methods via an Interface
    Forcing Behavior on a Class
    Declaring Fields in Interfaces
    Extending Interfaces
    Extending Multiple Interfaces
    Interfaces and Polymorphism
    Summary

    Chapter 11 Exception Handling
    Overview of Exception Handling
    Flow of Control of Exceptions
    Throwable Classes
    Methods of the Throwable Class
    Catching Exceptions
    Writing try/catch Blocks
    Multiple catch Blocks
    Handle or Declare Rule
    Declaring Exceptions
    The throws Keyword
    Throwing Exceptions
    The finally Keyword
    Overridden Methods and Exceptions
    User-Defined Exceptions
    Summary

    Chapter 12 An Introduction to GUI Programming
    AWT versus Swing
    Creating Windows
    java.awt.Frame Class
    javax.swing.JFrame Class
    Containers and Components
    Adding Components to a Container
    Layout Managers
    FlowLayout Manager
    BorderLayout Manager
    Panels
    GridLayout Manager
    BoxLayout Manager
    Nesting Panels
    Using No Layout Manager
    Summary

    Chapter 13 GUI Components and Event Handling
    The Delegation Model
    The Event Listener Interfaces
    Creating an Event Listener
    Registering a Listener with an Event Source
    The Event Adapter Classes
    Buttons
    AWT Buttons
    Swing Buttons
    Check Boxes
    AWT Check Boxes
    Swing Check Boxes
    Radio Buttons
    AWT Radio Buttons
    Swing Radio Buttons
    Labels
    Text Components
    AWT Text Components
    Swing Text Components
    Lists
    AWT Lists
    Swing Lists
    Combo Boxes
    AWT Choice
    Swing Combo Boxes
    Progress Bars
    Menus
    Summary

    Chapter 14 Applets
    An Overview of Applets
    The java.applet.Applet Class
    Swing Applets
    Life Cycle of an Applet
    Step 1: Write the Applet Class
    Step 2: Write the HTML Page
    Step 3: View the HTML Page
    Step 4: View the Java Console
    The <applet> Tag
    Document and Code Base
    The appletviewer Tool
    Sandbox Security
    The Applet Context
    Displaying Images
    Playing Audio
    JAR Files and Applets
    Summary

    Chapter 15 Threads
    Overview of Threads
    Life Cycle of a Thread
    Creating a Thread
    Implementing Runnable
    Extending the Thread Class
    Methods of the Thread Class
    Timer and TimerTask Classes
    Scheduling Tasks
    Multithreading Issues
    synchronized Keyword
    Deadlock Issues
    Ordering Locks
    wait() and notify() Methods
    Summary

    Chapter 16 Input and Output
    An Overview of the java.io Package
    The Output Streams
    The Input Stream Classes
    The Writer Class
    The Reader Class
    Low-Level and High-Level Streams
    Low-Level Streams
    High-Level Streams
    Chaining Streams Together
    Low-Level Readers and Writers
    High-Level Readers and Writers
    File I/O
    The RandomAccessFile Class
    Using Pipes
    An Overview of Serialization
    Serializing an Object
    Deserializing an Object
    The Logging APIs
    An Example of Logging
    Summary

    Chapter 17 Network Programming
    An Overview of Network Programming
    Transmission Control Protocol
    User Datagram Protocol
    Using Sockets
    The ServerSocket Class
    Socket Class
    Communicating between Sockets
    Java Secure Socket Extension (JSSE)
    Secure Server Socket
    Secure Client Socket
    Communicating over a Secure Socket
    Overview of Datagram Packets
    DatagramSocket Class
    DatagramPacket Class
    Receiving a Datagram Packet
    Sending a Datagram Packet
    Working with URLs
    URLConnections
    Summary

    Chapter 18 Database Programming
    An Overview of JDBC
    JDBC Drivers
    Connecting to a Database
    Using the DriverManager Class
    Using the DataSource Class
    An SQL Primer
    Creating Data
    Reading Data
    Updating Data
    Deleting Data
    Creating Statements
    Simple Statements
    Working with Result Sets
    Navigating a Result Set
    Viewing a Result Set
    Updating a Result Set
    Prepared Statements
    Step 1: Preparing the Statement
    Step 2: Setting the Parameters
    Step 3: Executing a Prepared Statement
    Callable Statements
    Summary

    Chapter 19 JavaBeans
    Overview of JavaBeans
    Simple Properties
    Packaging a Bean
    Step 1: Write the Bean Class
    Step 2: Write the Manifest File
    Step 3: Create the JAR File
    Step 4: Download the Bean Builder
    Step 5: Run the Bean Builder
    Step 6: Load the Movie Bean into the Bean Builder
    Step 7: Using the Movie Bean in the Builder Tool
    Bound Properties
    Step 8: Binding Properties in the Bean Builder
    Constrained Properties
    Vetoing an Event
    Overview of Events
    Step 9: Hooking up Buttons to the Movie Bean
    Step 10: Viewing Beans in Preview Mode
    Generating User-Defined Events
    BeanInfo Class
    Summary

    Appendix About the 60 Minutes Web Site
    Index

    Leave a Reply

    Blogger templates

    Blogger news

    Blogroll