Foreword
- Jeanne Boyarsky
1 Introduction
- 1.2 Why Java?
- 1.3 What kinds of concepts are in this book?
- 1.4 Who is this book for?
- 1.5 What are the Java Challenges?
- 1.6 Disclaimer about the Java Challenges
- 1.7 Java versioning and tools
- 1.8 Will this book prepare you for the software development market?
2 Variable types and flow control (Review)
- 2.1 A Brief Review about Algorithms
- 2.2 Arithmetic Operators
- 2.3 Flow Control
- 2.4 Loops
- 2.5 Arrays
- 2.6 Local variable restrictions
- 2.7 Candy Price Code Challenge
- 2.8 Summary
3 Basic object-oriented programming (Review)
- 3.1 Classes
- 3.2 Methods
- 3.3 The Keyword this
- 3.4 Constructors
- 3.5 Object references
- 3.6 Arrays are objects in Java
- 3.7 Bank Deposit/Withdraw Challenge
- 3.8 Summary
4 Encapsulation access modifiers, and package structure
- 4.1 Programming to interfaces
- 4.2 What are and how to use getters and setters?
- 4.3 The Builder Design Pattern
- 4.4 Organizing Packages in a Real Project
- 4.5 Encapsulation Patterns
- 4.6 Access Modifiers
- 4.7 Inner Class
- 4.8 The static keyword
- 4.9 Instance and static block
- 4.10 Small Real-World Project Challenge
- 4.11 Summary
5 Overloading
- 5.1 Overloading basics
- 5.2 Wrappers and autoboxing
- 5.3 Varargs
- 5.4 Overloading Real-World Usage Challenge
- 5.5 Summary
6 Inheritance and Polymorphism
- 6.1 When to use inheritance
- 6.2 Every Class is an Object
- 6.3 Checking the type of an object
- 6.4 The
toStringmethod - 6.5 Access modifiers and inheritance
- 6.6 Object composition
- 6.7 Multiple inheritance in Java
- 6.8 Using super to access a parent class’s methods
- 6.9 Constructors and inheritance
- 6.10 Class casting
- 6.11 Preventing inheritance
- 6.12 Abstract classes
- 6.13 Factory Method Strategy Discount Real-world Challenge
- 6.14 Summary
7 Interfaces
- 7.1 Interfaces and Polymorphism
- 7.2 Covariant return types
- 7.3 Default methods
- 7.4 Abstract classes vs. interfaces
- 7.5 Static methods in interfaces
- 7.6 Simulating multiple inheritance with default methods
- 7.7 Private methods in interfaces
- 7.8 Command Design Pattern Challenge
- 7.9 Summary
8 Exceptions
- 8.1 Checked and unchecked exceptions
- 8.2 Stack Trace
- 8.3 Handling or Declaring Checked Exceptions
- 8.4 try, catch, finally
- 8.6 try with resources
- 8.7 Multi catch
- 8.8 Creating a customized exception
- 8.9 Throw early, catch late
- 8.10 Real World Exception Creation Challenge
- 8.11 Summary
9 Lambdas and Functional Interfaces
- 9.1 What is Lambda?
- 9.2 Functional Interfaces
- 9.3 Method Reference
- 9.4 Lambda Method Reference Matcher Challenge:
- 9.5 Summary
10 Optional
- 10.1 Wrapping a value into Optional
- 10.2 isPresent and isEmpty
- 10.3 Optional Antipatterns
- 10.4 ifPresent and ifPresentOrElse
- 10.6 Handling Exceptions with orElseThrow
- 10.7 Transforming Optional Data
- 10.8 Final Yoshi Food Optional Challenge
- 10.9 Summary
11 Generics and Object Comparison
- 11.1 Comparing objects with equals and hashcode
- 11.2 Generics
- 11.4 Upper and Lower Bound Generics
- 11.5 Summary
12 Collections
- 12.1 Collections API
- 12.2 List
- 12.3 ArrayList
- 12.4 Vector
- 12.5 Deque & Stack
- 12.6
ConcurrentModificationException - 12.7 Using Comparable
- 12.8 Set
- 12.9 HashSet
- 12.10 LinkedHashSet
- 12.11 TreeSet
- 12.12 Map
- 12.16 TreeMap
- 12.17 Elements Searching
- 12.18 Summary
13 Streams
- 13.1 Streams Basic Principles
- 13.2 Creating a Stream
- 13.3 Intermediate VS Terminal Operation Methods
- 13.4 Intermediate Operations
- 13.5 Terminal Operations
- 13.6 Parallelizing Data Processing with parallel()
- 13.7 Collecting Data with collect()
- 13.8 Collectors.groupingBy
- 13.9 Summary
14 Newest Features of Java
- 14.1 Java Release Strategy
- 14.2 Introduction to Modules
- 14.3 Java JDK Base Modules
- 14.4 Named application module
- 14.5 Unnamed module
- 14.6 Exporting Packages from Module
- 14.7 Requiring a Module
- 14.8 Exporting a service with provides with
- 14.9 Module Reflection Access
- 14.10 Star Trek Planets Module Special Challenge
- 14.11 Reserved word var
- 14.12 New switch case statement
- 14.13 Using Pattern Matching Type Checks Java 15
- 14.14 Using record
- 14.15 Using Sealed classes Java 15
- 14.16 Text Blocks Java 15
- 14.17 Summary
15 Concurrency Fundamentals
- 15.1 Fundamentals of Concurrency
- 15.2 Thread
- 15.3 Using Thread sleep
- 15.4 Using join
- 15.5 non-daemon and daemon Thread
- 15.6 Using interrupt
- 15.7 Race Condition
- 15.8 Mutual Exclusion (Mutex)
- 15.9 Using wait and notify
- 15.10 Summary
16 Advanced Concurrency
- 16.1 ReentrantLock Basics
- 16.2 Atomic Variables
- 16.3 The volatile keyword
- 16.4 The happens-before Rule
- 16.5 CompletableFuture
- 16.6 Threadpool with Executors
- 16.7 ConcurrentHashMap
- 16.8 ConcurrentSkipListMap
- 16.9 Producer Consumer with BlockingQueue
- 16.10 Summary
17 Next Steps
- 17.1 Other important Java features
- 17.2 Practicing Clean Code
- 17.3 Tendencies of the market
- 17.4 Getting prepared for interviews
- 17.5 Strategies to Stay Sharp
- 17.6 Learn more about negotiation
- 17.7 Do you want more?
