Beginning Programming with Java For Dummies, 5th Edition

Book description

Learn to speak the Java language like the pros

Are you new to programming and have decided that Java is your language of choice? Are you a wanna-be programmer looking to learn the hottest lingo around? Look no further! Beginning Programming with Java For Dummies, 5th Edition is the easy-to-follow guide you'll want to keep in your back pocket as you work your way toward Java mastery! In plain English, it quickly and easily shows you what goes into creating a program, how to put the pieces together, ways to deal with standard programming challenges, and so much more.

Whether you're just tooling around or embarking on a career, this is the ideal resource you'll turn to again and again as you perfect your understanding of the nuances of this popular programming language. Packed with tons of step-by-step instruction, this is the only guide you need to start programming with Java like a pro.

  • Updated for Java 9, learn the language with samples and the Java toolkit
  • Familiarize yourself with decisions, conditions, statements, and information overload
  • Differentiate between loops and arrays, objects and classes, methods, and variables
  • Find links to additional resources

Once you discover the joys of Java programming, you might just find you're hooked. Sound like fun? Here's the place to start.

Table of contents

    1. Cover
    2. Introduction
      1. About This Book
      2. How to Use This Book
      3. Conventions Used in This Book
      4. What You Don’t Have to Read
      5. Foolish Assumptions
      6. How This Book Is Organized
      7. Icons Used in This Book
      8. Beyond the Book
      9. Where to Go from Here
    3. Part 1: Getting Started with Java Programming
      1. Chapter 1: Getting Started
        1. What’s It All About?
        2. From Your Mind to the Computer’s Processor
        3. Your Java Programming Toolset
      2. Chapter 2: Setting Up Your Computer
        1. If You Don’t Like Reading Instructions …
        2. Getting This Book’s Sample Programs
        3. Setting Up Java
        4. Setting Up the Eclipse Integrated Development Environment
        5. Importing This Book’s Sample Programs
        6. What’s Next?
      3. Chapter 3: Running Programs
        1. Running a Canned Java Program
        2. Typing and Running Your Own Code
        3. What’s All That Stuff in Eclipse’s Window?
    4. Part 2: Writing Your Own Java Programs
      1. Chapter 4: Exploring the Parts of a Program
        1. Checking Out Java Code for the First Time
        2. The Elements in a Java Program
        3. Understanding a Simple Java Program
      2. Chapter 5: Composing a Program
        1. Computers Are Stupid
        2. A Program to Echo Keyboard Input
        3. Expecting the Unexpected
      3. Chapter 6: Using the Building Blocks: Variables, Values, and Types
        1. Using Variables
        2. What Do All Those Zeros and Ones Mean?
        3. Reading Decimal Numbers from the Keyboard
        4. Variations on a Theme
        5. Experimenting with JShell
      4. Chapter 7: Numbers and Types
        1. Using Whole Numbers
        2. Creating New Values by Applying Operators
        3. Size Matters
      5. Chapter 8: Numbers? Who Needs Numbers?
        1. Characters
        2. The boolean Type
        3. The Remaining Primitive Types
    5. Part 3: Controlling the Flow
      1. Chapter 9: Forks in the Road
        1. Decisions, Decisions!
        2. Making Decisions (Java if Statements)
        3. Variations on the Theme
      2. Chapter 10: Which Way Did He Go?
        1. Forming Bigger and Better Conditions
        2. Building a Nest
        3. Enumerating the Possibilities
      3. Chapter 11: How to Flick a Virtual Switch
        1. Meet the switch Statement
        2. Using Fall-Through to Your Advantage
        3. Using a Conditional Operator
      4. Chapter 12: Around and Around It Goes
        1. Repeating Instructions over and over Again (Java while Statements)
        2. Thinking about Loops (What Statements Go Where)
        3. Thinking about Loops (Priming)
      5. Chapter 13: Piles of Files: Dealing with Information Overload
        1. Running a Disk-Oriented Program
        2. Writing a Disk-Oriented Program
        3. Writing, Rewriting, and Rerewriting
      6. Chapter 14: Creating Loops within Loops
        1. Paying Your Old Code a Little Visit
        2. Creating Useful Code
      7. Chapter 15: The Old Runaround
        1. Repeating Statements a Certain Number of Times ( Java for Statements)
        2. Using Nested for Loops
        3. Repeating Until You Get What You Need (Java do Statements)
        4. Repeating with Predetermined Values (Java’s Enhanced for Statement)
      8. Chapter 16: Using Loops and Arrays
        1. Some Loops in Action
        2. Reader, Meet Arrays; Arrays, Meet the Reader
        3. Working with Arrays
        4. Looping in Style
        5. Deleting Several Files
    6. Part 4: Using Program Units
      1. Chapter 17: Programming with Objects and Classes
        1. Creating a Class
        2. From Classes Come Objects
        3. Another Way to Think about Classes
        4. What’s Next?
      2. Chapter 18: Using Methods and Fields from a Java Class
        1. The String Class
        2. Using an Object’s Methods
        3. Static Methods
        4. Understanding the Big Picture
      3. Chapter 19: Creating New Java Methods
        1. Defining a Method within a Class
        2. Let the Objects Do the Work
        3. Passing Values to Methods
        4. Getting a Value from a Method
      4. Chapter 20: Oooey GUI Was a Worm
        1. The Java Swing Classes
        2. The Swing Classes: Round 2
        3. Code Soup: Mixing XML with Java
        4. Adding Stuff to Your JavaFX Project
        5. Taking Action
    7. Part 5: The Part of Tens
      1. Chapter 21: Ten Websites for Java
        1. This Book’s Website
        2. The Horse’s Mouth
        3. Finding News, Reviews, and Sample Code
        4. Looking for Java Jobs
        5. Got a Question?
      2. Chapter 22: Ten Useful Classes in the Java API
        1. ArrayList
        2. File
        3. Integer
        4. JFrame
        5. JOptionPane
        6. Math
        7. NumberFormat
        8. Scanner
        9. String
        10. System
    8. About the Author
    9. Advertisement Page
    10. Connect with Dummies
    11. End User License Agreement

Product information

  • Title: Beginning Programming with Java For Dummies, 5th Edition
  • Author(s): Barry A. Burd
  • Release date: July 2017
  • Publisher(s): For Dummies
  • ISBN: 9781119235538