ebook img

Java Projects PDF

6.84 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Java Projects

Title Page Page: 2 Copyright and Credits Page: 2 Java Projects Second Edition Page: 4 Packt Upsell Page: 5 Why subscribe? Page: 6 PacktPub.com Page: 7 Contributors Page: 8 About the author Page: 9 About the reviewer Page: 10 Packt is searching for authors like you Page: 11 Acknowledgments Page: 12 Preface Page: 16 Who this book is for Page: 17 What this book covers Page: 18 To get the most out of this book Page: 19 Download the example code files Page: 20 Download the color images Page: 21 Conventions used Page: 22 Get in touch Page: 23 Reviews Page: 24 Getting Started with Java 11 Page: 25 Getting started with Java Page: 26 Version numbers Page: 28 Installing Java Page: 29 Installation on Windows Page: 30 Installation on macOS Page: 31 Installation on Linux Page: 32 Setting JAVA_HOME Page: 33 Executing jshell Page: 34 Looking at the bytecode Page: 38 Packaging classes into a JAR file Page: 39 Managing the running Java application Page: 40 Using an IDE Page: 41 NetBeans Page: 42 Eclipse Page: 43 IntelliJ Page: 44 IDE services Page: 45 IDE screen structure Page: 46 Editing files Page: 47 Managing projects Page: 48 Building the code and running it Page: 49 Debugging Java Page: 50 Summary Page: 51 The First Real Java Program - Sorting Names Page: 52 Getting started with sorting Page: 53 Bubble sort Page: 54 Getting started with project structure and build tools Page: 55 Make Page: 56 Ant Page: 57 Installing Ant Page: 58 Using Ant Page: 59 Maven Page: 60 Installing Maven Page: 61 Using Maven Page: 62 Gradle Page: 63 Installing Gradle Page: 64 Setting up the project with Maven Page: 65 Coding the sort Page: 66 Understanding the algorithm and language constructs Page: 67 Blocks Page: 68 Variables Page: 69 Types Page: 70 Arrays Page: 71 Expressions Page: 72 Loops Page: 73 Conditional execution Page: 74 Final variables Page: 75 Classes Page: 76 Inner, nested, local, and anonymous classes Page: 77 Packages Page: 78 Methods Page: 79 Interfaces Page: 80 Argument passing Page: 81 Fields Page: 82 Modifiers Page: 83 Object initializers and constructors Page: 84 Compiling and running the program Page: 85 Summary Page: 86 Optimizing the Sort - Making Code Professional Page: 87 The general sorting program Page: 88 A brief overview of various sorting algorithms Page: 90 Quicksort Page: 91 Project structure and build tools Page: 92 Maven dependency management Page: 93 Coding the sort Page: 94 Creating the interfaces Page: 95 Creating BubbleSort Page: 96 Architectural considerations Page: 97 Creating unit tests Page: 98 Adding JUnit as a dependency Page: 99 Writing the BubbleSortTest class Page: 100 Good unit tests Page: 101 A good unit test is readable Page: 102 Unit tests are fast Page: 103 Unit tests are deterministic Page: 104 Assertions should be as simple as possible Page: 105 Unit tests are isolated Page: 106 Unit tests cover the code Page: 107 Refactoring the test Page: 108 Collections with wrong elements Page: 109 Handling exceptions Page: 110 Generics Page: 112 Test-Driven Development Page: 114 Implementing QuickSort Page: 115 The partitioning class Page: 116 Recursive sorting Page: 118 Non-recursive sorting Page: 119 Implementing the API class Page: 120 Creating modules Page: 121 Why modules are needed Page: 122 What is a Java module? Page: 123 Summary Page: 124 Mastermind - Creating a Game Page: 125 The game Page: 126 The model of the game Page: 127 Java collections Page: 129 Interface collection Page: 130 Set Page: 131 Hash functions Page: 132 The equals method Page: 133 The hashCode method Page: 134 Implementing equals and hashCode Page: 135 HashSet Page: 136 EnumSet Page: 137 LinkedHashSet Page: 138 SortedSet Page: 139 NavigableSet Page: 140 TreeSet Page: 141 List Page: 142 LinkedList Page: 143 ArrayList Page: 144 Queue Page: 145 Deque Page: 146 Map Page: 147 HashMap Page: 148 IdentityHashMap Page: 149 Dependency injection Page: 150 Implementing the game Page: 151 ColorManager Page: 152 The class color Page: 153 JavaDoc and code comments Page: 154 Row Page: 155 Table Page: 158 Guesser Page: 159 UniqueGuesser Page: 160 GeneralGuesser Page: 161 The Game class Page: 162 Creating an integration test Page: 163 Summary Page: 165 Extending the Game - Run Parallel, Run Faster Page: 166 How to make Mastermind parallel Page: 167 Refactoring Page: 169 Processes Page: 173 Threads Page: 174 Fibers Page: 175 java.lang.Thread Page: 176 Pitfalls Page: 177 Deadlocks Page: 178 Race conditions Page: 179 Overused locks Page: 180 Starving Page: 181 ExecutorService Page: 182 Completable future Page: 183 ForkJoinPool Page: 184 Variable access Page: 185 The CPU heartbeat Page: 186 Volatile variables Page: 187 Synchronized block Page: 188 Wait and notify Page: 189 Lock Page: 190 Condition Page: 191 ReentrantLock Page: 192 ReentrantReadWriteLock Page: 193 Atomic variables Page: 194 BlockingQueue Page: 195 LinkedBlockingQueue Page: 196 LinkedBlockingDeque Page: 197 ArrayBlockingQueue Page: 198 LinkedTransferQueue Page: 199 IntervalGuesser Page: 200 ParallelGamePlayer Page: 201 Microbenchmarking Page: 202 Summary Page: 205 Making Our Game Professional - Do it as a Web App Page: 206 Web and network Page: 207 IP Page: 208 TCP/IP Page: 209 DNS Page: 210 The HTTP protocol Page: 211 HTTP methods Page: 212 Status codes Page: 213 HTTP/2 Page: 214 Cookies Page: 215 Client server and web architecture Page: 216 Writing a servlet Page: 217 Hello world servlet Page: 218 JavaServer Pages Page: 219 HTML, CSS, and JavaScript Page: 220 Mastermind servlet Page: 221 Storing state Page: 222 HTTP session Page: 223 Storing state on the client Page: 224 Dependency injection with Guice Page: 225 The MastermindHandler class Page: 226 Storing state on the server Page: 227 The GameSessionSaver class Page: 228 Running the Jetty web servlet Page: 229 Logging Page: 230 Configurability Page: 231 Performance Page: 232 Log frameworks Page: 233 Java logging Page: 234 Logging practice Page: 235 Other technologies Page: 236 Summary Page: 237 Building a Commercial Web Application Using REST Page: 238 The MyBusiness web shop Page: 239 Sample business architecture Page: 240 Microservices Page: 241 Service interface design Page: 242 JSON Page: 243 REST Page: 244 Model View Controller Page: 245 Spring framework Page: 246 Architecture of Spring Page: 247 Spring core Page: 248 Service classes Page: 252 Compiling and running the application Page: 255 Testing the application Page: 256 Integration tests Page: 257 Application tests Page: 258 Servlet filters Page: 259 Audit logging and AOP Page: 260 Dynamic proxy-based AOP Page: 262 Summary Page: 263 Extending Our E-Commerce Application Page: 264 The MyBusiness ordering Page: 265 Setting up the project Page: 266 Order controller and DTOs Page: 267 Consistency checker Page: 268 Annotations Page: 269 Annotation retention Page: 270 Annotation target Page: 271 Annotation parameters Page: 272 Repeatable annotations Page: 273 Annotation inheritance Page: 274 @Documented annotation Page: 275 JDK annotations Page: 276 Using reflection Page: 277 Getting annotations Page: 278 Invoking methods Page: 280 Setting fields Page: 283 Functional programming in Java Page: 284 Lambda Page: 285 Streams Page: 286 Functional interfaces Page: 287 Method references Page: 289 Scripting in Java Page: 292 Summary Page: 296 Building an Accounting Application Using Reactive Programming Page: 297 Reactive... what? Page: 298 Reactive programming in a nutshell Page: 299 Reactive systems Page: 301 Responsive Page: 302 Resilient Page: 303 Elastic Page: 304 Message-driven Page: 305 Back-pressure Page: 306 Reactive streams Page: 307 Reactive programming in Java Page: 308 Implementing the inventory Page: 309 Summary Page: 311 Finalizing Java Knowledge to a Professional Level Page: 312 Java deep technologies Page: 313 Java agent Page: 314 Polyglot programming Page: 315 Polyglot configuration Page: 316 Polyglot scripting Page: 317 Business DSL Page: 318 Problems with polyglot Page: 319 Annotation processing Page: 320 Programming in the enterprise Page: 323 Static code analysis Page: 324 Source code version-control Page: 325 Software versioning Page: 326 Code review Page: 327 Knowledge base Page: 328 Issue tracking Page: 329 Testing Page: 330 Types of tests Page: 331 Test automation Page: 332 Black box versus white box Page: 333 Selecting libraries Page: 334 Fit for the purpose Page: 335 License Page: 336 Documentation Page: 337 An alive project Page: 338 Maturity Page: 339 Number of users Page: 340 The "I like it" factor Page: 341 Continuous integration and deployment Page: 342 Release management Page: 343 The code repository Page: 344 Walking up the ladder Page: 345 Summary Page: 346 Other Books You May Enjoy Page: 347 Leave a review - let other readers know what you think Page: 348

Description:
Learn how to build scalable, resilient, and effective applications in Java that suit your software requirements. Key Features Explore advanced technologies that Java 11 delivers such as web programming and parallel computing Discover modern programming paradigms such as microservices, cloud computing and enterprise structures Build highly responsive applications with this practical introduction to Reactive programming Book Description Java is one of the most commonly used software languages by programmers and developers. In this book, you'll learn the new features of Java 11 quickly and experience a simple and powerful approach to software development. You'll see how to use the Java runtime tools, understand the Java environment, and create a simple namesorting Java application. Further on, you'll learn about advanced technologies that Java delivers, such as web programming and parallel computing, and will develop a mastermind game. Moving on, we provide more simple examples, to build a foundation before diving into some complex data structure problems that will solidify your Java 11 skills. With a special focus on the features of new projects: Project Valhalla, Project Panama, Project Amber, and Project Loom, this book will help you get employed as a top-notch Java developer. By the end of the book, you'll have a firm foundation to continue your journey toward becoming a professional Java developer. What you will learn Compile, package, and run a program using a build management tool Get to know the principles of test-driven development Separate the wiring of multiple modules from application logic Use Java annotations for configuration Master the scripting API built into the Java language Understand static versus dynamic implementation of code Who this book is for This book is for anyone who wants to learn the Java programming language. No programming experience required. If you have prior experience, it will help you through the book more easily.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.