You are previewing Java For Everyone: Compatible with Java 5, 6, and 7, 2nd Edition.
O'Reilly logo
Java For Everyone: Compatible with Java 5, 6, and 7, 2nd Edition

Book Description

Authoritative but accessible information on Java programming fundamentals

As one of the most popular programming languages in the world, Java is widely used in everything from application software to web applications. This helpful book escorts you through the fundamentals and concepts of Java programming using a first/late objects approach. Packed with extensive opportunities for programming practice, Java For Everyone is an ideal resource for learning all there is to know about Java programming.

  • Serves as an authoritative guide on the fundamentals of Java programming

  • Features accessible coverage compatible with Java 5, 6, 7

  • Uses first/late objects approach and provides a variety of opportunities for programming practice

If you're interested in learning the basics of Java programming, then this is the book you need.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright
  4. Preface
    1. Present fundamentals first.
    2. Guidance and worked examples help students succeed.
    3. Practice makes perfect.
    4. A visual approach motivates the reader and eases navigation.
    5. Focus on the essentials while being technically accurate.
    6. New to This Edition
    7. A Tour of the Book
    8. A Walkthrough of the Learning Aids
    9. WileyPLUS
  5. Acknowledgments
  6. Contents
  7. CHAPTER 1: INTRODUCTION
    1. 1.1 Computer Programs
    2. 1.2 The Anatomy of a Computer
    3. 1.3 The Java Programming Language
    4. 1.4 Becoming Familiar with Your Programming Environment
    5. 1.5 Analyzing Your First Program
    6. 1.6 Errors
    7. 1.7 Problem Solving: Algorithm Design
  8. CHAPTER 2: FUNDAMENTAL DATA TYPES
    1. 2.1 Variables
    2. 2.2 Arithmetic
    3. 2.3 Input and Output
    4. 2.4 Problem solving: First Do It By hand
    5. 2.5 Strings
  9. CHAPTER 3: DECISIONS
    1. 3.1 The if Statement
    2. 3.2 Comparing Numbers and Strings
    3. 3.3 Multiple Alternatives
    4. 3.4 Nested Branches
    5. 3.5 Problem Solving: Flowcharts
    6. 3.6 Problem Solving: Test Cases
    7. 3.7 Boolean Variables and Operators
    8. 3.8 Application: Input Validation
  10. CHAPTER 4: LOOPS
    1. 4.1 The While Loop
    2. 4.2 Problem Solving: Hand-Tracing
    3. 4.3 The for Loop
    4. 4.4 The do Loop
    5. 4.5 Application: Processing Sentinel Values
    6. 4.6 Problem Solving: Storyboards
    7. 4.7 Common Loop Algorithms
    8. 4.8 Nested Loops
    9. 4.9 Application: Random Numbers and Simulations
  11. CHAPTER 5: METHODS
    1. 5.1 Methods as Black Boxes
    2. 5.2 Implementing Methods
    3. 5.3 Parameter Passing
    4. 5.4 Return Values
    5. 5.5 Methods Without Return Values
    6. 5.6 Problem Solving: Reusable Methods
    7. 5.7 Problem Solving: Stepwise Refinement
    8. 5.8 Variable Scope
    9. 5.9 Recursive Methods (Optional)
  12. CHAPTER 6: ARRAYS AND ARRAY LISTS
    1. 6.1 Arrays
    2. 6.2 The Enhanced for Loop
    3. 6.3 Common Array Algorithms
    4. 6.4 Using Arrays with Methods
    5. 6.5 Problem Solving: Adapting Algorithms
    6. 6.6 Problem Solving: Discovering Algorithms by Manipulating Physical Objects
    7. 6.7 Two-Dimensional Arrays
    8. 6.8 Array Lists
  13. CHAPTER 7: INPUT/OUTPUT AND EXCEPTION HANDLING
    1. 7.1 Reading and Writing Text Files
    2. 7.2 text Input and output
    3. 7.3 Command Line Arguments
    4. 7.4 Exception Handling
    5. 7.5 Application: Handling Input Errors
  14. CHAPTER 8: OBJECTS AND CLASSES
    1. 8.1 Object-Oriented Programming
    2. 8.2 Implementing a Simple Class
    3. 8.3 Specifying the Public Interface of a Class
    4. 8.4 Designing the Data Representation
    5. 8.5 Implementing Instance Methods
    6. 8.6 Constructors
    7. 8.7 Testing a Class
    8. 8.8 Problem Solving: Tracing Objects
    9. 8.9 Problem Solving: Patterns for Object Data
    10. 8.10 Object References
    11. 8.11 Static Variables and Methods
  15. CHAPTER 9: INHERITANCE AND INTERFACES
    1. 9.1 Inheritance Hierarchies
    2. 9.2 Implementing subclasses
    3. 9.3 overriding Methods
    4. 9.4 Polymorphism
    5. 9.5 Object: The Cosmic Superclass
    6. 9.6 Interface Types
  16. CHAPTER 10: GRAPHICAL USER INTERFACES
    1. 10.1 Frame Windows
    2. 10.2 Events and Event Handling
    3. 10.3 Processing Text Input
    4. 10.4 Creating Drawings
  17. APPENDIX A: THE BASIC LATIN AND LATIN - 1 SUBSETS OF UNICODE
  18. APPENDIX B: JAVA OPERATOR SUMMARY
  19. APPENDIX C: JAVA RESERVED WORD SUMMARY
  20. APPENDIX D: THE JAVA LIBRARY
    1. Package java.awt
    2. Package java.awt.event
    3. Package java.io
    4. Package java.lang
    5. Package java.math
    6. Package java.text
    7. Package java.util
    8. Package java.util.logging
    9. Package javax.swing
    10. Package javax.swing.border
    11. Package javax.swing.event
    12. Package javax.swing.text
  21. Glossary
  22. Index
  23. ILLUSTRATION CREDITS
    1. Preface
    2. Chapter 1
    3. Chapter 2
    4. Chapter 3
    5. Chapter 4
    6. Chapter 5
    7. Chapter 6
    8. Chapter 7
    9. Chapter 8
    10. Chapter 9
    11. Chapter 10
    12. Chapter 11
    13. Icons
    14. Chapters Available on the Web Chapter 12
    15. Chapter 13
    16. Chapter 14
    17. Chapter 15