Java All-in-One For Dummies

Höfundur: Doug Lowe (Útgáfa: 8)
Java All-in-One For Dummies

Kaup valmöguleikar

Get started with Java programming the friendly and fun way Java is one of the most widely used programming languages, powering everything from games to artificial intelligence applications. Java All-in-One For Dummies, 8th Edition helps you wrap your head around the language from the ground up. Whether you're brand-new to coding or a veteran programmer brushing up on your skills, you'll find clear explanations that cover both the basics and more advanced features.

You’ll explore object-oriented programming, data structures, algorithms, and key programming techniques at your own pace. Java is secure, runs on any platform, and is used by more than 90% of Fortune 500 companies for mission-critical applications, so learning it puts you in great company. You'll build real skills without drowning in jargon. Inside this guide: Get a solid introduction to Java fundamentals, including variables, loops, and how to set up your coding environment Explore object-oriented programming concepts that make managing large codebases easier and more organized Build your understanding of data structures and algorithms used in professional software development every day Discover techniques for developing games, processing data, and creating applications across multiple platforms with Java Whether you're preparing for your first software developer role or adding Java to an already stacked skill set, this For Dummies guide has you covered.

You’ll go from curious beginner to confident coder!

Nánar um bókina

Útgefandi
Wiley Professional Development (P&T)
ISBN
9781394419982
Print ISBN
9781394419975
Format
ePub
Útgáfa
8
Höfundar
Doug Lowe
Tungumál
English
Útgefið
2026-10-26
Prent takmörkun á líftíma
100
Prent takmörkun
10
Afritunar takmörkun
2

Kaflar

  • Cover
  • Table of Contents
  • Title Page
  • Copyright
  • Introduction
  • About This Book
  • Foolish Assumptions
  • Icons Used in This Book
  • Beyond the Book
  • Where to Go from Here
  • Book 1: Modern Java Basics
  • Chapter 1: Welcome to Modern Java!
  • What Is Java, and Why Is It So Great?
  • Important Features of the Java Language
  • Java Version Insanity
  • What’s in a Name?
  • Chapter 2: Getting Started with Your First Java Program
  • Downloading and Installing the Java Development Kit
  • Confirming Your Java Version
  • Creating Your First Java Program
  • Using Java Documentation
  • Chapter 3: Creating Your Java Development Environment
  • Getting Started with GitHub
  • Creating a Repository
  • Installing Git
  • Getting Started with IntelliJ IDEA
  • Creating a Java Project
  • Running the HelloApp Program
  • Sending Your Project to GitHub
  • Book 2: Programming Basics
  • Chapter 1: Modern Java Programming Basics
  • Revisiting Hello, World!
  • Running the Hello, World! Program
  • Pulling Back the Curtain
  • Unpacking System.out.println
  • Dealing with Keywords
  • Working with Statements
  • Working with Blocks
  • Creating Identifiers
  • Crafting Comments
  • Introducing Object-Oriented Programming
  • Importing Java API Classes
  • Chapter 2: Working with Variables and Data Types
  • Declaring Variables
  • Initializing Variables
  • Using Final Variables (Constants)
  • Working with Primitive Data Types
  • Working with Strings
  • Converting and Casting Numeric Data
  • Thinking Inside the Box
  • Understanding Scope
  • Shadowing Variables
  • Printing Data with System.out
  • Getting Input with the Scanner Class
  • Using enum to Create Your Own Data Types
  • Chapter 3: Working with Numbers and Expressions
  • Working with Arithmetic Operators
  • Dividing Integers
  • Combining Operators
  • Using the Unary Plus and Minus Operators
  • Using Increment and Decrement Operators
  • Using the Assignment Operator
  • Using Compound Assignment Operators
  • Using the Math Class
  • Formatting Numbers
  • Recognizing Weird Things about Java Math
  • Chapter 4: Making Choices
  • Using Simple Boolean Expressions
  • Using if Statements
  • Using Mr. Spock’s Favorite Operators (Logical Ones, of Course)
  • Using the Conditional Operator
  • Comparing Strings
  • Chapter 5: Going Around in Circles (or, Using Loops)
  • Using Your Basic while Loop
  • Breaking Out of a Loop
  • Looping Forever
  • Using the continue Statement
  • Running do-while Loops
  • Validating Input from the User
  • Using the Famous for Loop
  • Nesting Your Loops
  • Chapter 6: Pulling a Switcheroo
  • Battling else-if Monstrosities
  • Using the switch Statement
  • Creating Character Cases
  • Matching Two or More Values in a Single Case Group
  • Intentionally Leaving Out a Break Statement
  • Switching with Strings
  • Assigning a Value with a Switch Statement
  • Chapter 7: Adding Some Methods to Your Madness
  • The Joy of Methods
  • The Basics of Making Methods
  • Methods That Return Values
  • Methods That Take Parameters
  • Chapter 8: Handling Exceptions
  • Understanding Exceptions
  • Catching Exceptions
  • Handling Exceptions with a Preemptive Strike
  • Catching All Exceptions at Once
  • Displaying the Exception Message
  • Using a finally Block
  • Handling Checked Exceptions
  • Throwing Your Own Exceptions
  • Using the try-with-resources Statement
  • Book 3: Object-Oriented Programming
  • Chapter 1: Understanding Object-Oriented Programming
  • What Is Object-Oriented Programming?
  • Understanding Objects
  • Understanding the Life Cycle of an Object
  • Working with Related Classes
  • Designing a Program with Objects
  • Diagramming Classes with UML
  • Chapter 2: Making Your Own Classes
  • Declaring a Class
  • Working with Members
  • Using Getters and Setters
  • Overloading Methods
  • Creating Constructors
  • Finding More Uses for the this Keyword
  • Using Initializers
  • Using Records
  • Chapter 3: Working with Statics
  • Understanding Static Fields and Methods
  • Working with Static Fields
  • Using Static Methods
  • Counting Instances
  • Preventing Instances
  • Using Static Initializers
  • Chapter 4: Using Subclasses and Inheritance
  • Introducing Inheritance
  • Creating Subclasses
  • Overriding Methods
  • Protecting Your Members
  • Using the this and super Keywords in Your Subclasses
  • Understanding Inheritance and Constructors
  • Using the final Keyword
  • Casting Up and Down
  • Determining an Object’s Type
  • Poly What?
  • Creating Custom Exceptions
  • Chapter 5: Using Abstract Classes and Interfaces
  • Using Abstract Classes
  • Using Interfaces
  • More Things You Can Do with Interfaces
  • Using Additional Interface Method Types
  • Two Interfaces That Enable Java Language Features
  • Sealing Your Classes
  • Chapter 6: Using the Object and Class Classes
  • The Mother of All Classes: Object
  • The toString Method
  • The equals Method
  • The clone Method
  • The Class Class
  • Using the instanceof Operator
  • Pattern Matching with the instanceof Operator
  • Pattern Matching with switch
  • Being Guarded
  • Deconstructing Records
  • Chapter 7: Using Inner Classes and Anonymous Classes
  • Declaring Inner Classes
  • Using Static Inner Classes
  • Using Anonymous Inner Classes
  • Chapter 8: Working with Packages and the Java Module System
  • Working with Packages
  • Putting Your Classes in a JAR File
  • Using Javadoc to Document Your Classes
  • Using the Java Module System
  • Book 4: Strings and Other Data Types
  • Chapter 1: Working with Strings
  • Reviewing Strings
  • Using the String Class
  • Determining Whether a String Is Empty
  • Using the StringBuilder and StringBuffer Classes
  • Using the CharSequence Interface
  • Using Text Blocks
  • Chapter 2: Working with Dates and Times
  • Pondering How Time Is Represented
  • Picking the Right Date and Time Class for Your Application
  • Using the now Method to Create a Date-Time Object
  • Using the parse Method to Create a Date-Time Object
  • Using the of Method to Create a Date-Time Object
  • Looking Closer at the LocalDate Class
  • Extracting Information about a Date
  • Comparing Dates
  • Calculating with Dates
  • Formatting Dates
  • Looking at a Fun Birthday Calculator
  • Chapter 3: Using the BigDecimal Class
  • Seeing Why Java Can’t Add
  • BigDecimal to the Rescue!
  • Creating BigDecimal Objects
  • Doing BigDecimal Arithmetic
  • Rounding BigDecimal Values
  • Comparing BigDecimal Values
  • Converting BigDecimals to Strings
  • Revisiting Sales Tax
  • Book 5: Data Structures
  • Chapter 1: Introducing Data Structures
  • Imagining Models of Computation
  • Defining Data Structures
  • Quantifying Performance
  • Analyzing Arrays
  • Looking at Linked Lists
  • Doubling Down with Doubly Linked Lists
  • Surmising Stacks and Queues
  • Musing about Maps
  • Checking Out Hash Maps
  • Tackling Trees
  • Checking Out Binary Trees
  • Chapter 2: Using Arrays
  • Understanding Arrays
  • Creating Arrays
  • Initializing an Array
  • Using for Loops with Arrays
  • Solving Homework Problems with Arrays
  • Using the Enhanced for Loop
  • Using Arrays with Methods
  • Using Varargs
  • Using Two-Dimensional Arrays
  • Working with a Fun but Complicated Example: A Chessboard
  • Using the Arrays Class
  • Chapter 3: Using the ArrayList Class
  • Understanding the ArrayList Class
  • Creating an ArrayList Object
  • Adding Elements
  • Accessing Elements
  • Printing an ArrayList
  • Using an Iterator
  • Updating Elements
  • Deleting Elements
  • Chapter 4: Using the LinkedList Class
  • Understanding the LinkedList Class
  • Creating a LinkedList
  • Adding Items to a LinkedList
  • Retrieving Items from a LinkedList
  • Updating LinkedList Items
  • Removing LinkedList Items
  • Chapter 5: Creating Generic Collection Classes
  • Why Generics?
  • Creating a Generic Class
  • A Generic Stack Class
  • Using Wildcard-Type Parameters
  • A Generic Queue Class
  • Chapter 6: Using Maps and Trees
  • Mastering Maps
  • Using the HashMap Class
  • Removing Entries from a Hash Map
  • Book 6: Algorithms
  • Chapter 1: Introducing Algorithms
  • What Is an Algorithm?
  • Classifying Algorithms
  • Some Fun Algorithm Challenges
  • Chapter 2: Using Recursion
  • Calculating the Classic Factorial Example
  • Displaying Directories
  • Playing the Towers of Hanoi
  • Chapter 3: Sorting
  • Looking at the Bubble Sort Algorithm
  • Introducing the Quicksort Algorithm
  • Chapter 4: Searching
  • Creating a Data Structure Worth Searching
  • Looking at Linear Searching
  • Using a Binary Search
  • Book 7: Programming Techniques
  • Chapter 1: Programming Threads
  • Understanding Threads
  • Creating a Thread
  • Implementing the Runnable Interface
  • Creating Threads That Work Together
  • Considering Thread Safety
  • Using the volatile Keyword for Thread Safety
  • Using the AtomicInteger Class for Thread Safety
  • Using the synchronized Keyword for Thread Safety
  • Using the ReentrantLock Class for Thread Safety
  • Coping with Threadus Interruptus
  • Considering Virtual Threads
  • Chapter 2: Using Functional Programming and Lambda Expressions
  • Introducing Functional Programming
  • Introducing Functional Interfaces
  • Using Lambda Expressions
  • Using the java.util.function Package
  • Using Method References Instead of Lambdas
  • Chapter 3: Using the Streams API
  • Stepping into Streams
  • Welcome to the Daisy Hill Sloth Sanctuary
  • Opting for Optionals
  • Chapter 4: Consuming Web Services with HttpClient
  • Introducing Web Services
  • Understanding HTTP
  • Getting Started with Java’s HTTP Client Library
  • Putting It All Together
  • The HTTP Tester Program
  • Book 8: JavaFX
  • Chapter 1: Hello, JavaFX!
  • Perusing the Possibilities of JavaFX
  • Getting Ready to Run JavaFX
  • Looking at a Simple JavaFX Program
  • Importing JavaFX Packages
  • Extending the Application Class
  • Launching the Application
  • Overriding the start Method
  • Creating a Button
  • Handling an Action Event
  • Creating a Layout Pane
  • Making a Scene
  • Setting the Stage
  • Examining the Click Counter Program
  • Chapter 2: Handling Events
  • Examining Events
  • Handling Events
  • Implementing the EventHandler Interface
  • Handling Events with Inner Classes
  • Handling Events with Anonymous Inner Classes
  • Using Lambda Expressions to Handle Events
  • Chapter 3: Setting the Stage and Scene Layout
  • Examining the Stage Class
  • Examining the Scene Class
  • Switching Scenes
  • Creating an Alert Box
  • Exit, Stage Right
  • Chapter 4: Using Layout Panes to Arrange Your Scenes
  • Working with Layout Panes
  • Using the HBox Layout
  • Spacing Things Out
  • Adding Space with Margins
  • Adding Space by Growing Nodes
  • Using the VBox Layout
  • Aligning Nodes in a Layout Pane
  • Using the Flow Layout
  • Using the Border Layout
  • Using the GridPane Layout
  • Chapter 5: Getting Input from the User
  • Using Text Fields
  • Validating Numeric Data
  • Using Check Boxes
  • Using Radio Buttons
  • Index
  • About the Author
  • Dedication
  • Author’s Acknowledgments
  • Connect with Dummies
  • End User License Agreement

Hvernig virkar þetta?

Hvernig þú kaupir og lest bókina, 3 mín