Java Challengers
$5.99
Minimum price
$9.99
Suggested price

Java Challengers

Challenge Yourself With Fun Java Code Challenges

About the Book

To get the best jobs and create massive value, you need to know Java very well. The Java Challenges book is a way for you to challenge yourself with fun code challenges so you will become a better Java developer.

This book contains more than 70 well-elaborated Java Challenges that will help you break your limits on your Java skills. Want to challenge yourself and become better? The Java Challenges is the book for you!

About the Author

Rafael Chinelato del Nero
Rafael Chinelato del Nero

Rafael del Nero is a Java Champion & Oracle Groundbreaker Ambassador, creator of the Java Challengers initiative and quiz master in Oracle Dev Gym, is the author of "Golden Lessons - 100 Insights to Overcome Life's Challenges and Achieve Your Career Dreams." Rafael believes there are many techniques involved in creating high-quality software that developers are often unaware of. His life's purpose is to help Java developers use better programming practices to code quality software for stress-free projects with fewer bugs.

Table of Contents

  • 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 toString method
    • 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.1.3 Mysterious Door Lambda Challenge
    • 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 Collections (In Development)
    • 11.1 Comparing objects with equals and hashcode
    • 11.2 Generics
    • 11.3 List
    • 11.5 Immutability with ArrayList
    • 11.6 Deque & Stack
    • 11.7 The ConcurrentModificationException
    • 11.8 Using Comparable
    • 11.9 Set
    • 11.10 Map
    • 11.11 Elements Sorting & Searching
    • 11.12 Summary
  • 12 Streams (In Development)
    • 12.1 Normal Stream
    • 12.2 Parallel Stream
    • 12.3 Processing Order
    • 12.4 Collect
    • 12.5 flatMap
    • 12.6 reduce
    • 12.7 Summary
  • 13 Newest Features of Java (In Development)
    • 13.1 Introduction to Modules Java 9
    • 13.2 Reserved word var from Java 10
    • 13.3 New switch case statement from Java 14
    • 13.4 Using record from Java 14
    • 13.5 Using Sealed classes Java 15
    • 13.6 Using Pattern Matching Type Checks Java 15
    • 13.7 Text Blocks Java 15
    • 13.8 Summary

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Do Well. Do Good.

Authors have earned$10,803,456writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF, EPUB and/or MOBI files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub