Format:
1 Online-Ressource (vii, 498 Seiten)
,
Illustrationen
Edition:
Second edition
ISBN:
9781789130690
Content:
Java is one of the software languages most commonly used by programmers and developers. This book covers essential concepts in Java by showing you how to implement them in various applications. You'll learn about Java 18.9's newest features and develop the skills required for building robust, easily scalable, and maintainable code in Java
Content:
Cover -- Title Page -- Copyright and Credits -- Packt Upsell -- Contributors -- Acknowledgments -- Table of Contents -- Preface -- Chapter 1: Getting Started with Java 11 -- Getting started with Java -- Version numbers -- Installing Java -- Installation on Windows -- Installation on macOS -- Installation on Linux -- Setting JAVA_HOME -- Executing jshell -- Looking at the bytecode -- Packaging classes into a JAR file -- Managing the running Java application -- Using an IDE -- NetBeans -- Eclipse -- IntelliJ -- IDE services -- IDE screen structure -- Editing files -- Managing projects -- Building the code and running it -- Debugging Java -- Summary -- Chapter 2: The First Real Java Program - Sorting Names -- Getting started with sorting -- Bubble sort -- Getting started with project structure and build tools -- Make -- Ant -- Installing Ant -- Using Ant -- Maven -- Installing Maven -- Using Maven -- Gradle -- Installing Gradle -- Setting up the project with Maven -- Coding the sort -- Understanding the algorithm and language constructs -- Blocks -- Variables -- Types -- Arrays -- Expressions -- Loops -- Conditional execution -- Final variables -- Classes -- Inner, nested, local, and anonymous classes -- Packages -- Methods -- Interfaces -- Argument passing -- Fields -- Modifiers -- Object initializers and constructors -- Compiling and running the program -- Summary -- Chapter 3: Optimizing the Sort - Making Code Professional -- The general sorting program -- A brief overview of various sorting algorithms -- Quicksort -- Project structure and build tools -- Maven dependency management -- Coding the sort -- Creating the interfaces -- Creating BubbleSort -- Architectural considerations -- Creating unit tests -- Adding JUnit as a dependency -- Writing the BubbleSortTest class -- Good unit tests -- A good unit test is readable -- Unit tests are fast
Content:
Unit tests are deterministic -- Assertions should be as simple as possible -- Unit tests are isolated -- Unit tests cover the code -- Refactoring the test -- Collections with wrong elements -- Handling exceptions -- Generics -- Test-Driven Development -- Implementing QuickSort -- The partitioning class -- Recursive sorting -- Non-recursive sorting -- Implementing the API class -- Creating modules -- Why modules are needed -- What is a Java module? -- Summary -- Chapter 4: Mastermind - Creating a Game -- The game -- The model of the game -- Java collections -- Interface collection -- Set -- Hash functions -- The equals method -- The hashCode method -- Implementing equals and hashCode -- HashSet -- EnumSet -- LinkedHashSet -- SortedSet -- NavigableSet -- TreeSet -- List -- LinkedList -- ArrayList -- Queue -- Deque -- Map -- HashMap -- IdentityHashMap -- Dependency injection -- Implementing the game -- ColorManager -- The class color -- JavaDoc and code comments -- Row -- Table -- Guesser -- UniqueGuesser -- GeneralGuesser -- The Game class -- Creating an integration test -- Summary -- Chapter 5: Extending the Game - Run Parallel, Run Faster -- How to make Mastermind parallel -- Refactoring -- Processes -- Threads -- Fibers -- java.lang.Thread -- Pitfalls -- Deadlocks -- Race conditions -- Overused locks -- Starving -- ExecutorService -- Completable future -- ForkJoinPool -- Variable access -- The CPU heartbeat -- Volatile variables -- Synchronized block -- Wait and notify -- Lock -- Condition -- ReentrantLock -- ReentrantReadWriteLock -- Atomic variables -- BlockingQueue -- LinkedBlockingQueue -- LinkedBlockingDeque -- ArrayBlockingQueue -- LinkedTransferQueue -- IntervalGuesser -- ParallelGamePlayer -- Microbenchmarking -- Summary -- Chapter 6: Making Our Game Professional - Do it as a Web App -- Web and network -- IP -- TCP/IP -- DNS
Additional Edition:
Erscheint auch als Druck-Ausgabe ISBN 978-1-78913-189-5
Language:
English
Subjects:
Computer Science
Keywords:
Java Standard Edition 11
Bookmarklink