To view this book's Cheat Sheet, simply go to
www.dummies.com and search for “Java All-in-
One For Dummies Cheat Sheet” in the Search box.
Table of Contents
1. Cover
2. Title Page
3. Copyright
4. Introduction
1. About This Book
2. Foolish Assumptions
3. Icons Used in This Book
4. Beyond the Book
5. Where to Go from Here
5. Book 1: Java Basics
1. Chapter 1: Welcome to Java
1. What Is Java, and Why Is It So Great?
2. Important Features of the Java Language
3. Java Version Insanity
4. What’s in a Name?
2. Chapter 2: Installing and Using Java Tools
1. Downloading and Installing the Java Development Kit
2. Confirming Your Java Version
, 3. Using Java’s Command-Line Tools
4. Using Java Documentation
3. Chapter 3: Working with TextPad
1. Downloading and Installing TextPad
2. Editing Source Files
3. Compiling a Program
4. Running a Java Program
6. Book 2: Programming Basics
1. Chapter 1: Java Programming Basics
1. Looking at the Venerable Hello, World! Program
2. Dealing with Keywords
3. Working with Statements
4. Working with Blocks
5. Creating Identifiers
6. Crafting Comments
7. Introducing Object-Oriented Programming
8. Importing Java API Classes
2. Chapter 2: Working with Variables and Data Types
1. Declaring Variables
2. Initializing Variables
3. Using Final Variables (Constants)
4. Working with Primitive Data Types
5. Working with Strings
6. Converting and Casting Numeric Data
7. Thinking Inside the Box
8. Understanding Scope
9. Shadowing Variables
10. Printing Data with System.out
, 11. Getting Input with the Scanner Class
12. Getting Input with the JOptionPane Class
13. Using enum to Create Your Own Data Types
3. Chapter 3: Working with Numbers and Expressions
1. Working with Arithmetic Operators
2. Dividing Integers
3. Combining Operators
4. Using the Unary Plus and Minus Operators
5. Using Increment and Decrement Operators
6. Using the Assignment Operator
7. Using Compound Assignment Operators
8. Using the Math Class
9. Formatting Numbers
10. Recognizing Weird Things about Java Math
4. Chapter 4: Making Choices
1. Using Simple Boolean Expressions
2. Using if Statements
3. Using Mr. Spock’s Favorite Operators (Logical Ones, of Course)
4. Using the Conditional Operator
5. Comparing Strings
5. Chapter 5: Going Around in Circles (or, Using Loops)
1. Using Your Basic while Loop
2. Breaking Out of a Loop
3. Looping Forever
4. Using the continue Statement
5. Running do-while Loops
6. Validating Input from the User
7. Using the Famous for Loop