We use cookies to provide essential features and services. By using our website you agree to our use of cookies .


Warehouse Stock Clearance Sale

Grab a bargain today!

Java in 21 Days, Sams Teach Yourself


Product Description
Product Details

Table of Contents

WEEK I: The Java Language
DAY 1: Getting Started with Java
The Java Language
History of the Language
Introduction to Java
Selecting a Development Tool
Object-Oriented Programming
Objects and Classes
Attributes and Behavior
Attributes of a Class of Objects
Behavior of a Class of Objects
Creating a Class
Running the Program
Organizing Classes and Class Behavior
Creating a Class Hierarchy
Inheritance in Action

DAY 2: The ABCs of Programming
Statements and Expressions
Variables and Data Types
Creating Variables
Naming Variables
Variable Types
Assigning Values to Variables
Number Literals
Boolean Literals
Character Literals
String Literals
Expressions and Operators
More About Assignment
Incrementing and Decrementing
Logical Operators
Operator Precedence
String Arithmetic

DAY 3: Working with Objects
Creating New Objects
How Objects Are Constructed
A Note on Memory Management
Using Class and Instance Variables
Getting Values
Setting Values
Class Variables
Calling Methods
Formatting Strings
Nesting Method Calls
Class Methods
References to Objects
Casting Objects and Primitive Types
Casting Primitive Types
Casting Objects
Converting Primitive Types to Objects and Vice Versa
Comparing Object Values and Classes
Comparing Objects
Determining the Class of an Object

DAY 4: Lists, Logic, and Loops
Declaring Array Variables
Creating Array Objects
Accessing Array Elements
Changing Array Elements
Multidimensional Arrays
Block Statements
If Conditionals
Switch Conditionals
The Ternary Operator
For Loops
While and Do Loops
While Loops
Do-While Loops
Breaking Out of Loops
Labeled Loops

DAY 5: Creating Classes and Methods
Defining Classes
Creating Instance and Class Variables
Defining Instance Variables
Class Variables
Creating Methods
Defining Methods
The this Keyword
Variable Scope and Method Definitions
Passing Arguments to Methods
Class Methods
Creating Java Applications
Helper Classes
Java Applications and Arguments
Passing Arguments to Java Applications
Handling Arguments in Your Java Application
Creating Methods with the Same Name
Basic Constructors
Calling Another Constructor
Overloading Constructors
Overriding Methods
Creating Methods That Override Existing Methods
Calling the Original Method
Overriding Constructors

DAY 6: Packages, Interfaces, and Other Class Features
Access Control for Methods and Variables
Static Variables and Methods
Final Classes, Methods, and Variables
Abstract Classes and Methods
The import Declaration
Class Name Conflicts
Creating Your Own Packages
Picking a Package Name
Creating the Folder Structure
Adding a Class to a Package
Packages and Class Access Control
The Problem of Single Inheritance
Interfaces and Classes
Implementing and Using Interfaces
Implementing Multiple Interfaces
Other Uses of Interfaces
Creating and Extending Interfaces
New Interfaces
Methods Inside Interfaces
Extending Interfaces
Creating an Online Storefront

DAY 7: Exceptions and Threads
Exception Classes
Managing Exceptions
Exception Consistency Checking
Protecting Code and Catching Exceptions
The finally Clause
Declaring Methods That Might Throw Exceptions
The throws Clause
Which Exceptions Should You Throw
Passing on Exceptions
throws and Inheritance
Creating and Throwing Exceptions
Throwing Exceptions
Creating Your Own Exceptions
Combining throws, try, and throw
When Not to Use Exceptions
Bad Style Using Exceptions
Writing a Threaded Program
A Threaded Application
Stopping a Thread

WEEK II: The Java Class Library
DAY 8: Data Structures
Moving Beyond Arrays
Java Structures
Bit Sets
Array Lists
Looping Through Data Structures
Hash Maps

DAY 9: Working with Swing
Creating an Application
Creating an Interface
Developing a Framework
Creating a Component
Adding Components to a Container
Working with Components
Image Icons
Text Fields
Text Areas
Scrolling Panes
Check Boxes and Radio Buttons
Combo Boxes
The Java Class Library

DAY 10: Building a Swing Interface
Swing Features
Standard Dialog Boxes
Using Dialog Boxes
Scroll Panes
Progress Bars
Tabbed Panes

DAY 11: Arranging Components on a User Interface
Basic Interface Layout
Laying Out an Interface
Flow Layout
Box Layout
Grid Layout
Border Layout
Mixing Layout Managers
Card Layout
Using Card Layout in an Application
Cell Padding and Insets

DAY 12: Responding to User Input
Event Listeners
Setting Up Components
Event-Handling Methods
Working with Methods
Action Events
Focus Events
Item Events
Key Events
Mouse Events
Mouse Motion Events
Window Events
Using Adapter Classes
Using Inner Classes

DAY 13: Creating Java2D Graphics
The Graphics2D Class
The Graphics Coordinate System
Drawing Text
Improving Fonts and Graphics with Antialiasing
Finding Information About a Font
Using Color Objects
Testing and Setting the Current Colors
Drawing Lines and Polygons
User and Device Coordinate Spaces
Specifying the Rendering Attributes
Creating Objects to Draw
Drawing Objects
DAY 14: Developing Swing Applications
Java Web Start
Using Java Web Start
Creating a JNLP File
Supporting Web Start on a Server
Additional JNLP Elements
Improving Performance with SwingWorker

WEEK III: Java Programming
DAY 15: Working with Input and Output
Introduction to Streams
Using a Stream
Filtering a Stream
Handling Exceptions
Byte Streams
File Streams
Filtering a Stream
Byte Filters
Character Streams
Reading Text Files
Writing Text Files
Files and Paths

DAY 16: Using Inner Classes and Closures
Inner Classes
Anonymous Inner Classes
DAY 17: Communicating Across the Internet
Networking in Java
Opening a Stream Over the Net
Socket Servers
Testing the Server
The java.nio Package

DAY 18: Accessing Databases with JDBC 4.2 and Derby
Java Database Connectivity
Database Drivers
Examining a Database
Reading Records from a Database
Writing Records to a Database
Moving Through Resultsets

DAY 19: Reading and Writing RSS Feeds
Using XML
Designing an XML Dialect
Processing XML with Java
Processing XML with XOM
Creating an XML Document
Modifying an XML Document
Formatting an XML Document
Evaluating XOM

DAY 20: XML Web Services
Introduction to XML-RPC
Communicating with XML-RPC
Sending a Request
Responding to a Request
Choosing an XML-RPC Implementation
Using an XML-RPC Web Service
Creating an XML-RPC Web Service

DAY 21: Writing Android Apps with Java
The History of Android
Writing an Android App
Organizing an Android Project
Creating the Program
Running the App
Designing an Android App
Preparing Resources
Configuring a Manifest File
Designing the Graphical User Interface
Writing Code

APPENDIX A: Using the NetBeans Integrated Development Environment
Installing NetBeans
Creating a New Project
Creating a New Java Class
Running the Application
Fixing Errors
Expanding and Shrinking a Pane
Exploring NetBeans

APPENDIX B: This Book's Website

APPENDIX C: Fixing a Problem with the Android Studio Emulator
Problems Running an App
Install HAXM in Android Studio
Install HAXM on Your Computer
Checking BIOS Settings

APPENDIX D: Using the Java Development Kit
Choosing a Java Development Tool
Installing the Java Development Kit
Configuring the Java Development Kit
Using a Text Editor
Creating a Sample Program
Compiling and Running the Program in Windows
Setting Up the CLASSPATH Variable
APPENDIX E: Programming with the Java Development Kit
Overview of the JDK
The java Virtual Machine
The javac Compiler
The appletviewer Browser
The javadoc Documentation Tool
The jar Java File Archival Tool
The jdb Debugger
Debugging Applications
Debugging Applets
Advanced Debugging Commands
Using System Properties
The keytool and jarsigner Code Signing Tools

About the Author

Rogers Cadenhead is a programmer and author. He has written more than 30 books on programming and web publishing, including Sams Teach Yourself Java in 24 Hours and Absolute Beginner's Guide to Minecraft Mods Programming. He also publishes the Drudge Retort and other websites that receive more than 20 million visits a year.

This item has low availability through normal channels. The supplier has a low reliability rating in Fishpond's system and may not arrive on time. Learn more.

Ask a Question About this Product More...
Look for similar items by category
Item ships from and is sold by Fishpond.com, Inc.
Back to top