Book 2

Programming Basics

Contents at a Glance

  1. Chapter 1: Java Programming Basics
    1. Looking at the Infamous 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
    8. Nesting Your Loops
  6. Chapter 6: Pulling a Switcheroo
    1. Battling else-if Monstrosities
    2. Using the switch Statement
    3. Creating Character Cases
    4. Intentionally Leaving Out a Break Statement
    5. Switching with Strings
  7. Chapter 7: Adding Some Methods to Your Madness
    1. The Joy of Methods
    2. The Basics of Making Methods
    3. Methods That Return Values
    4. Methods That Take Parameters
  8. Chapter 8: Handling Exceptions
    1. Understanding Exceptions
    2. Catching Exceptions
    3. Handling Exceptions with a Preemptive Strike
    4. Catching All Exceptions at Once
    5. Displaying the Exception Message
    6. Using a finally Block
    7. Handling Checked Exceptions
    8. Throwing Your Own Exceptions
    9. Catching Multiple Exceptions
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset