Java 7 for Absolute Beginners

(nextflipdebug5) #1

■ CONTENTS


  - Methods vii
- Constructors
- Access Modifiers
- Interfaces
- Exceptions
- Blocks
- Comments


  • Summary

  • ■Chapter 3: Data Types

    • Primitive Data Types

      • Integer Primitives

      • Real Primitives

      • boolean

      • char

      • The Special Type: String

      • Literals



    • Wrapper Classes

    • Arrays

    • The Non-Existent Type: null

    • Enumerations

    • Summary



  • ■Chapter 4: Operators

    • Operator Precedence

    • The Missing Operator: Parentheses........................................................................................................

    • Postfix Operators

    • Unary Operators

    • Casting

    • Multiplicative Operators

    • Additive Operators viii

    • Shift Operators

    • Relational Operators

    • Equality Operators

    • Bitwise AND Operator (&)

    • Bitwise Exclusive OR Operator (^)

    • Bitwise Inclusive OR Operator (|)

    • Logical AND Operator (&&)

    • Logical OR Operator (||)

    • Assignment Operators

    • Comparing and Sorting Objects

      • Implementing the equals Method

      • Comparisons for Sorting



    • Summary



  • ■Chapter 5: Control Flow, Looping, and Branching

    • Control Flow

      • if and if-else Statements

      • switch Statements



    • Looping

      • For Loops

      • While loops

      • Do-while Loops



    • Branching

      • The break Statement

      • The continue Statement

      • The return Statement



    • Summary



  • ■Chapter 6: Object-oriented Programming ix

    • Objects

    • Encapsulation

    • Inheritance

      • Multiple Inheritance

      • Modeling Behavior through Interfaces

      • Abstract Classes

      • Static Members



    • Polymorphism

    • Our Animals in Java

    • A Lesson about Granularity

    • Pass-by-Reference and Pass-by-Value

    • Summary



  • ■Chapter 7: Writing a User Interface

    • Java Swing: The Basics

      • A Basic Swing Application



    • A Larger Swing Application

    • Summary



  • ■Chapter 8: Writing and Reading Files

    • Working with File Objects

      • Opening a File

      • Deleting a File

      • Working with Temporary Files

      • Creating a Directory

      • Deleting a Directory

      • Deleting Multiple Directories



    • Writing and Reading Content x

      • Merrily Down the Stream

      • Reading a File's Content

      • Writing a File's Content



    • Summary



  • ■Chapter 9: Writing and Reading XML

    • The Structure of XML

    • XML and Streams

    • DOM and SAX

    • Writing XML

      • Writing XML with DOM

      • Writing XML with Strings



    • Reading XML

      • Reading XML with DOM

      • Reading XML with SAX



    • A Word about Factory Classes

    • Summary



  • ■Chapter 10: Animation

    • Timing Is Everything

    • Animation: A Simple Example

    • Animating Multiple Items

    • Sprite Animation

    • Summary



  • ■Chapter 11: Debugging with Eclipse

    • The Flow of Debugging

    • Debugging without a Debugger

    • Starting the Eclipse Debugger

    • Breakpoints and Variables xi

      • Setting a Line Breakpoint

      • About Scope

      • Removing a Line Breakpoint

      • Disabling a Line Breakpoint

      • Making a Conditional Breakpoint



    • Debugging Tips and Tricks

    • Fixing the Fireworks Program

    • Summary



  • ■Chapter 12: Video Games

    • The Mechanics of a Video Game

      • The User Interface

      • The Game Logic

      • The Game Loop



    • The TargetClick Game

    • The Shooting Gallery Game

      • Expanding the ShootingGallery Game

      • A Note about Limitations



    • Game Design Resources

    • Summary



  • ■Chapter 13: Garbage Collection

    • Understanding Memory Allocation

      • The Java Garbage Collection Algorithm: Marking and Sweeping

      • Understanding Memory Settings



    • Understanding Garbage Collection

      • Understanding Generations

      • Scavenges and Full Collections

      • Garbage Collection is Event-Driven xii

      • Understanding Garbage Collection Settings



    • Optimizing Garbage Collection

    • Collection Hints

    • Blocking Garbage Collection

    • A New Garbage Collector

    • Summary



  • ■Chapter 14: Recursion

    • Recursion is Natural

    • Recursion is Common

    • Know Your Stop Condition

    • When to Avoid Recursion

    • When to Use Recursion

    • Calculating the Fibonacci Sequence

    • Calculating Fractals

      • Drawing a Sierpinski Triangle

      • Drawing a Fractal Tree



    • Summary



  • ■Chapter 15: Generics and Regular Expressions

    • Generics

    • Regular Expressions

    • Summary



  • Index

Free download pdf