CHF65.90
Download est disponible immédiatement
Expand your knowledge of Java with this entertaining learning guide, which features 100+ exercises and programming challenges. Java Challenges will prepare you for your next exam or job interview, and covers many practical topics, such as strings, arrays, data structures, recursion, and date and time. The APIs and other material included in this book are Java 17 compatible.
Each topic is addressed in its own separate chapter, starting with an introduction to the basics and followed by multiple exercises of varying degrees of difficulty, helping you to improve your programming skills effectively. Detailed sample solutions, including the algorithms used for all tasks, are included to maximize your understanding of each area.
Author Michael Inden also describes alternative solutions and analyzes possible pitfalls and typical errors. Three appendices round out the book: one covering JShell, which is often helpful for trying out the code snippets and examples in the book, followed by an introduction to JUnit 5 for unit testing and verifying solutions, while the final appendix explains O-notation for estimating performance.
After reading this book, you'll be prepared to take the next step in your career or tackle your next personal project. All source code is freely available for download via the Apress website.
You will: Improve your Java knowledge by solving enjoyable but challenging programming puzzlesSolve mathematical problems, recursions, strings, arrays and moreManage data processing and data structures like lists, sets, mapsHandle advanced recursion as well as binary trees, sorting and searchingGamify key fundamentals for fun and easier reinforcement
Auteur
Michael Inden is an Oracle-certified Java developer with over 20 years of professional experience designing complex software systems for international companies. There, he has worked in various roles such as SW developer, SW architect, consultant, team leader, CTO, head of academy, and trainer. Currently, he is working as a freelancer.
His special interests are creating high-quality applications with ergonomic GUIs, developing and solving programming puzzles, and coaching. He likes to pass on his knowledge and has led various courses and talks, both internally and externally, as well as at conferences such as JAX/W-JAX, JAX London, and Oracle Code One.
Besides, he is also an author of technical books. His german books, among others "Der Weg zum Java-Profi", Java Challenge", "Python Challenge" are all published by dpunkt.verlag.
Contenu
1 Introduction ................................................ 11.1 Structure of the chapters ...................................... 11.2 Basic structure of the Eclipse project ............................ 31.3 Basic framework for unit tests .................................. 41.4 Note on programming style .................................... 51.5 Trying out the examples and solutions........................... 9I Fundamentals 112 Mathematical problems ...................................... 132.1 Introduction.................................................. 132.1.1 Roman numerals....................................... 172.1.2 Number Games ........................................ 182.2 Exercises ................................................... 212.2.1 Exercise 1: Basic Arithmetic () ................... 212.2.2 Exercise 2: Number as text () .................... 222.2.3 Exercise 3: Perfect numbers () ................... 222.2.4 Exercise 4: Prime Numbers () ................... 232.2.5 Exercise 5: Prime number pairs () ................ 232.2.6 Exercise 6: Checksum () ........................ 232.2.7 Exercise 7: Roman numbers () .................. 242.2.8 Exercise 8: Combinatorics () .................... 242.2.9 Exercise 9: Armstrong Numbers () ............... 252.2.10 Exercise 10: Max Change Calculator () ........... 252.2.11 Exercise 11: Related Numbers ()................. 262.2.12 Exercise 12: Prime factorization ()................ 262.3 Solutions .................................................... 272.3.1 Solution 1: Basic Arithmetic () ................... 272.3.2 Solution 2: Number as text () .................... 302.3.3 Solution 3: Perfect numbers () ................... 322.3.4 Solution 4: Prime Numbers () .................... 342.3.5 Solution 5: Prime number pairs () ................ 36vi Inhaltsverzeichnis2.3.6 Solution 6: Checksum () ........................ 402.3.7 Solution 7: Roman numbers () ................... 412.3.8 Solution 8: Combinatorics () ..................... 462.3.9 Solution 9: Armstrong Numbers () ................ 492.3.10 Solution 10: Max Change Calculator () ............ 522.3.11 Solution 11: Related Numbers () ................. 542.3.12 Solution 12: Prime factorization () ................ 553 Recursion .................................................. 593.1 Introduction.................................................. 593.1.1 Mathematical examples ................................. 593.1.2 Algorithmic examples ................................... 633.1.3 Steps when multiplying the digits of a number.............. 673.1.4 Typical problems ....................................... 683.2 Exercises ................................................... 713.2.1 Exercise 1: Fibonacci () ......................... 713.2.2 Exercise 2: Process digits () ..................... 713.2.3 Exercise 3: GCD () ............................. 723.2.4 Exercise 4: Reverse String () .................... 733.2.5 Exercise 5: Array Sum () ........................ 733.2.6 Exercise 6: Array Min () ......................... 733.2.7 Exercise 7: Conversions () ...................... 743.2.8 Exercise 8: Exponential Function ()............... 753.2.9 Exercise 9: Pascal's triangle () ................... 763.2.10 Exercise 10: Number palindromes ().............. 763.2.11 Exercise 11: Permutations () .................... 773.2.12 Exercise 12: Count Substrings () ................. 773.2.13 Exercise 13: Ruler () ........................... 783.3 Solutions .................................................... 79<...