
Head First Java
A Brain-Friendly Guide
by Kathy Sierra, Bert Bates, Trisha Gee
3rd Edition
Publisher: O'Reilly Media
Book Details
| Print ISBN | 9781491910771 |
| eText ISBN | 9781491910740 |
| Publisher | O'Reilly Media |
| Publishing Year | 2022 |
| Edition | 3rd Edition |
| Language | English |
| Pages | 752 |
Head First Java, 3rd Edition is an introductory software engineering textbook written by Kathy Sierra, Bert Bates, and Trisha Gee. Published by O'Reilly Media in 2022, this edition provides beginner Java programmers, computer science students, and developing software engineers with a structured entry point into Java programming.
The text organizes core instructional coverage around central object-oriented principles, detailed through classes, objects, encapsulation, inheritance, and polymorphism. Instruction moves through memory allocation mechanics, explaining the roles of the Stack and the Heap during runtime execution, while building practical familiarity with data structures such as List, ArrayList, and the Java Collections framework.
By integrating updates across Java versions 8 through 17, the volume addresses modern language standards. This coverage targets both introductory academic coursework and self-directed programming study, establishing a baseline for writing structured, object-oriented Java code across diverse application domains.
Table of Contents
Chapter Intro: Intro
- • Who is this book for?
- • We know what you’re thinking.
- • Metacognition: thinking about thinking.
- • Here’s what WE did
- • Here’s what YOU can do to bend your brain into submission
- • What you need for this book
- • Last-minute things you need to know
Chapter 1: Breaking the Surface
- • The Way Java Works
- • What you’ll do in Java
- • A Very Brief History of Java
- • Code structure in Java
- • Writing a class with a main()
- • Simple boolean tests
- • Conditional branching
- • Coding a Serious Business
- • Phrase-O-Matic
- • Exercises
- • Exercise Solutions
Chapter 2: A Trip to Objectville
- • Chair Wars
- • Making your first object
- • Making and testing Movie objects
- • Quick! Get out of main!
- • Running the Guessing Game
- • Exercises
- • Exercise Solutions
Chapter 3: Know Your Variables
- • Declaring a variable
- • “I’d like a double mocha, no, make it an int.”
- • Back away from that keyword!
- • Controlling your Dog object
- • An object reference is just another variable value.
- • Life on the garbage-collectible heap
- • An array is like a tray of cups
- • A Dog example
- • Exercises
- • Exercise Solutions
Chapter 4: How Objects Behave
- • Remember: a class describes what an object knows and what an object does
- • The size affects the bark
- • You can send things to a method
- • You can get things back from a method.
- • You can send more than one thing to a method
- • Cool things you can do with parameters and return types
- • Encapsulation
- • How do objects in an array behave?
- • Declaring and initializing instance variables
- • Comparing variables (primitives or references)
- • Exercises
- • Exercise Solutions
Chapter 5: Extra-Strength Methods
- • Let’s build a Battleship-style game: “Sink a Startup”
- • Developing a Class
- • Writing the method implementations
- • Writing test code for the SimpleStartup class
- • The checkYourself() method
- • Prep code for the SimpleStartupGame class
- • The game’s main() method
- • Let’s play
- • More about for loops
- • The enhanced for loop
- • Casting primitives
- • Exercises
- • Exercise Solutions
Chapter 6: Using the Java Library
- • In our last chapter, we left you with the cliff-hanger. A bug.
- • Wake up and smell the library
- • Some things you can do with ArrayList
- • Comparing ArrayList to a regular array
- • Let’s build the REAL game: “Sink a Startup”
- • Prep code for the real StartupBust class
- • The final version of the Startup class
- • Super Powerful Boolean Expressions
- • Using the Library (the Java API)
- • Exercises
- • Exercise Solutions
Chapter 7: Better Living in Objectville
- • Chair Wars Revisited...
- • Understanding inheritance
- • Let’s design the inheritance tree for an Animal simulation program
- • Looking for more inheritance opportunities
- • Using IS-A and HAS-A
- • How do you know if you’ve got your inheritance right?
- • When designing with inheritance, are you using or abusing?
- • Keeping the contract: rules for overriding
- • Overloading a method
- • Exercises
- • Exercise Solutions
Chapter 8: Serious Polymorphism
- • Did we forget about something when we designed this?
- • The compiler won’t let you instantiate an abstract class
- • Abstract vs. Concrete
- • You MUST implement all abstract methods
- • Polymorphism in action
- • Why not make a class generic enough to take anything?
- • When a Dog won’t act like a Dog
- • Let’s explore some design options
- • Making and Implementing the Pet interface
- • Invoking the superclass version of a method
- • Exercises
- • Exercise Solutions
Chapter 9: Life and Death of an Object
- • The Stack and the Heap: where things live
- • Methods are stacked
- • What about local variables that are objects?
- • The miracle of object creation
- • Construct a Duck
- • Doesn’t the compiler always make a no-arg constructor for you?
- • Nanoreview: four things to remember about constructors
- • The role of superclass constructors in an object’s life
- • Can the child exist before the parents?
- • What about reference variables?
- • I don’t like where this is headed.
- • Exercises
- • Exercise Solutions
Chapter 10: Numbers Matter
- • MATH methods: as close as you’ll ever get to a global method
- • The difference between regular (non-static) and static methods
- • Initializing a static variable
- • Math methods
- • Wrapping a primitive
- • Autoboxing works almost everywhere
- • Turning a primitive number into a String
- • Number formatting
- • The format specifier
- • Exercise
- • Exercise Solutions
Chapter 11: Data Structures
- • Exploring the java.util API, List and Collections
- • Generics means more type-safety
- • Revisiting the sort() method
- • The new, improved, comparable Song class
- • Sorting using only Comparators
- • Updating the Jukebox code with Lambdas
- • Using a HashSet instead of ArrayList
- • What you MUST know about TreeSet...
- • We’ve seen Lists and Sets, now we’ll use a Map
- • Finally, back to generics
- • Exercise Solutions
Chapter 12: What, Not How
- • Tell the computer WHAT you want
- • When for loops go wrong
- • Introducing the Streams API
- • Getting a result from a Stream
- • Guidelines for working with streams
- • Hello Lambda, my (not so) old friend
- • Spotting Functional Interfaces
- • Lou’s Challenge #1: Find all the “rock” songs
- • Lou’s Challenge #2: List all the genres
- • Exercises
- • Exercise Solutions
Chapter 13: Risky Behavior
Chapter 14: A Very Graphic Story
Chapter 15: Work on Your Swing
Chapter 16: Saving Objects (and Text)
Chapter 17: Make a Connection
Chapter 18: Dealing with Concurrency Issues
Chapter A: Appendix A
Chapter B: Appendix B
Customer Reviews
0.0
0 reviews
No reviews yet. Be the first to review this book!
Write a Review
Reviewed by GradeFocus Editorial Team
▶Research Sources (17)
- Head First Java, Kathy Sierra; Bert Bates
- Head First Java a book by Kathy Sierra, Bert Bates, and Trisha Gee
- Head First Java - Kathy Sierra, Bert Bates, Trisha Gee - e-kirja ...
- Head First Java - Kathy Sierra (9781491910740)
- Head First Java. 3rd Edition
- 楽天Kobo電子書籍ストア: Head First Java - 9781491910740
- Head First Java (ebook), Kathy Sierra | 9781491910740 | Boeken | bol
- Head First Java, eBook by Kathy Sierra | A Brain-Friendly Guide
- Head First Java eBook by Kathy Sierra - EPUB
- Head First Java.pdf
- Head First Java, 3nd Edition 2023 PDF book
- Is Buying Head First Java (3rd Edition - Java 11 or 8) Worth it Compared for ...
- Head First Java: A Brain-Friendly Guide [3 ed.] 1491910771, ...
- Head First Java, 3rd Edition [Book]
- Head First Java: A Brain-Friendly Guide (Paperback) by Trisha Gee et al.
- Head First Java (3rd Edition) summary | by Dalibor Plavcic
- Head First Java, 3rd Edition: A Brain-Friendly Guide - Sierra, Kathy
