Book description
Refine your Java skills by seamlessly blending foundational core concepts with hands-on coding applications
Key Features
- Gain a deep understanding of essential topics that will help you progress with Java
- Learn by working on mini-projects to help reinforce the concepts you’ve learned
- Gain comprehensive knowledge of the core concepts of Java
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
Learn Java with Projects stands out in the world of Java guides; while some books skim the surface and others get lost in too much detail, this one finds a nice middle ground.
You’ll begin by exploring the fundamentals of Java, from its primitive data types through to loops and arrays. Next, you’ll move on to object-oriented programming (OOP), where you’ll get to grips with key topics such as classes, objects, encapsulation, inheritance, polymorphism, interfaces, and more. The chapters are designed in a way that focuses on topics that really matter in real-life work situations. No extra fluff here, so that you get more time to spend on the basics and form a solid foundation. As you make progress, you’ll learn advanced topics including generics, collections, lambda expressions, streams and concurrency. This book doesn't just talk about theory—it shows you how things work with little projects, which eventually add up to one big project that brings it all together.
By the end of this Java book, you’ll have sound practical knowledge of Java and a helpful guide to walk you through the important parts of Java.
What you will learn
- Get a clear understanding of Java fundamentals such as primitive types, operators, scope, conditional statements, loops, exceptions, and arrays
- Master OOP constructs such as classes, objects, enums, interfaces, and records
- Develop a deep understanding of OOP principles such as polymorphism, inheritance, and encapsulation
- Delve into the advanced topics of generics, collections, lambdas, streams, and concurrency
- Visualize what is happening in memory when you call a method or create an object
- Appreciate how effective learning-by-doing is
Who this book is for
This book is for anyone looking to learn the core concepts of Java. If you’re learning programming (and Java) for the first time or want to upskill to Java (with experience in a different language), then this book is for you. Prior knowledge of programming is helpful but not necessary.
Table of contents
- Dr. Seán Kennedy
- Maaike van Putten
- Learn Java with Projects
- Contributors
- About the authors
- About the reviewers
- Preface
- Part 1: Java Fundamentals
- Chapter 1: Getting Started with Java
- Chapter 2: Variables and Primitive Data Types
- Chapter 3: Operators and Casting
- Chapter 4: Conditional Statements
- Chapter 5: Understanding Iteration
-
Chapter 6: Working with Arrays
- Technical requirements
- Arrays – what, when, and why?
- Declaring and initializing arrays
- Short syntax for array initialization
- Accessing elements in an array
- Working with length and bounds
- Iterating over arrays
- Handling multidimensional arrays
- Using Java’s built-in methods for arrays
- Exercises
- Project – Dino tracker
- Summary
- Chapter 7: Methods
- Part 2: Object-Oriented Programming
-
Chapter 8: Classes, Objects, and Enums
- Technical requirements
- Understanding the differences between classes and objects
- Contrasting instance with class members
- Exploring the “this” reference
- Applying access modifiers
- Encapsulation
- Mastering advanced encapsulation
- Delving into the object life cycle
- Explaining the instanceof keyword
- Understanding enums
- Appreciating records
- Exercises
- Project – Mesozoic Eden park manager
- Summary
-
Chapter 9: Inheritance and Polymorphism
- Technical requirements
- Understanding inheritance
- Applying inheritance
- Exploring polymorphism
- Contrasting method overriding and method overloading
- Exploring the super keyword
- Revisiting the protected access modifier
- Explaining the abstract and final keywords
- Applying sealed classes
- Understanding instance and static blocks
- Mastering upcasting and downcasting
- Exercises
- Project
- Summary
- Chapter 10: Interfaces and Abstract Classes
- Chapter 11: Dealing with Exceptions
- Chapter 12: Java Core API
- Part 3: Advanced Topics
- Chapter 13: Generics and Collections
- Chapter 14: Lambda Expressions
- Chapter 15: Streams – Fundamentals
- Chapter 16: Streams: Advanced Concepts
-
Chapter 17: Concurrency
- Technical requirements
- Understanding concurrency
- Working with threads
- Thread management – sleep() and join()
- Atomic classes
- The synchronized keyword
- The Lock interface
- Concurrent collections
- ExecutorService and thread pools
- Data races
- Threading problems
- Exercises
- Project – Park Operations System – the calm before the storm
- Summary
- Index
Product information
- Title: Learn Java with Projects
- Author(s):
- Release date: November 2023
- Publisher(s): Packt Publishing
- ISBN: 9781837637188
You might also like
book
Learn Java 17 Programming - Second Edition
Explore the essential concepts of programming such as object-oriented, functional, and reactive programming by writing code …
book
Java Projects - Second Edition
Learn how to build scalable, resilient, and effective applications in Java that suit your software requirements. …
book
Beginning Java Objects: From Concepts to Code
As a programming language, Java's object-oriented nature is key to creating powerful, reusable code and applications …
video
Java Fundamentals
Learn Java—the #1 language for professional programmers. This hands-on course guides you through your first steps …