
This video will give you an overview about the course.
Without a Java Development Kit, the user cannot start developing Java applications.
• Recognize that you have no JDK installed
• Download Java Development Kit
• Install Java Development Kit
Without a proper Integrated Development Environment, the user cannot start developing Java applications.
• Choose a good Integrated Development Environment to develop Java applications
• Download IntelliJ IDEA Community edition
• Install IntelliJ IDEA Community edition
If elements of a development kit are removed, it is a good practice to find out what elements are removed, how to replace or get them, and what to use instead of the removed or deprecated.
• Explore the removed features and deprecated API in the newest JDK
• Look for the removed features, and find where to download them from
• Search for the deprecated API
Java 12 has changed syntax, and has one of the most used expressions, that is, the switch expression, which has also changed. These should be considered to continue using and learning Java.
• Brush up the old syntax, and mention the biggest changes
• Go deeper in the new syntax changes, and learn the novelties
• Introduce the change in the syntax of the switch expression
There is a brand-new feature in Java 12, which allows us to use “var”, when declaring the formal parameters of implicitly typed lambda expressions. We must, however, know when and how to use it exactly.
• Bring back memories of implicitly typed lambda expressions from Java SE 8
• Introduce the local-variable syntax for lambda parameters
• Compare the syntax of implicitly typed lambda expressions with the syntax of a local variable declaration
Java is sometimes a very verbose language. A good developer always finds the way to simplify the code. There is a new, essential feature to clear up verbosity, which is the local-variable type inference.
• Learn how to shorten and simplify coding with local-variable type inference
• Study how to use type inference with the diamond operator
• Investigate the restrictions, i.e. right declaration of variables (no multiple), lambdas, methods, arrays, null, and reassignment
Up to now, whoever wanted to learn Java, had to go through a long compile-run process, to try new programs, or had to use an IDE. Java now lets the user launch single-file source-code programs. The source code is compiled in the memory, then the interpreter executes it.
• Learn how to launch a single-file source-code program and create an example
• Learn how to launch single-file source-code programs with command line arguments
• Understand how to launch single-file source-code programs with multiple classes
The HTTP Client API introduced in JDK 9 had to be standardized, and the incubated API had to be removed from JDK. JEP 321 proposes to standardize the HTTP Client API, that was introduced as an incubating API in JDK 9 and updated in JDK 10.
• Study about the CompletionStage API
• Look at CompletableFuture and the methods which create it
• Learn about other methods of CompletableStage and CompletableFuture like chains, joins, error handling, and timeouts
There are a couple of tricks with the WebSocket interface, decoding the HTTP response, and the parallel execution of network tasks in Java.
• Explore about using WebSockets through examples
• Study about handling the response body as a string, or streaming the response body to a file
• Learn how to implement parallel execution of tasks in Java, where a big task can be split into small chunks for better response and throughput
NullPointerExceptions are frequent and hard to deal with problems. After applying a few trial and error methods at first, we shall explore the functional programming style solution which was successful.
• Learn about the billion-dollar mistake, NullPointerExceptions
• Search for some references online
• Demo solutions to avoid null pointer exceptions, with functional programming style
Writing code to make sure that the input parameters are not null is not making your code better, it makes your code less safe, and besides this, less readable. Try to code without these null checks.
• Try to avoid if not null checks in the code
• Make further changes, and try out different approaches to avoid null checks
The purpose of Optional class is to provide a type-level solution for representing optional values instead of null references.
• Learn about java.util.Optional class
• Try to use Optional in cases where could be null
• Learn different usages of Optional
Primitive type streams from Java 8 allows us to process collections and other sequences of elements. Java provides a summaryStatistics() method that can be used to get multiple statistical properties of a stream (minimum value, average value, etc.).
• Learn about primitive type streams
• Use summaryStatistics method on streams
• Get multiple statistical values out of different streams
The Files.find() method returns stream of paths.
• Learn about stream and Files.find
• Find files with the help of coding
• Manage files from stream
The Files.find() method returns stream of paths. The returned stream encapsulates one or more directory streams.
• Learn about directory stream
• Get paths from Files.find streams
• Use paths from directory streams
Unwanted modifications can cause problems later during program execution. Hence, we need to detect them as soon as possible. Our new tool is the copyOf method, which produces unmodifiable collections. So, the modification is discovered right when it happens.
• Learn about the copyOf method of a collection
• Learn how to create an immutable collection with copyOf
• Prevent IndexOutOfBoundsException by detecting unwanted modification of a collection
There are too many possible faults when you create complex loops, especially when they are nested. Let us see the typical mistakes of loop constructs and search for solutions.
• See different defective loops, search for solutions
• Try out putIfAbsent as a solution
• Try out computeIfAbsent as a solution
The for and while loops are known by every developer. Still, senior developers also make mistakes using them from time to time. The predefined loop constructs prevent most of those mistakes. Also, they can make the developer’s intent more obvious.
• Learn how to use predefined loop constructs
• Try out reduce and generate
• Use Collectors.groupingBy
With predicates, you can easily filter strings. You can use short-circuiting logical AND, OR, and NEGATE too. Also, you can return a predicate if isEqual or not equal with the given argument.
• Show with predicates that anyone can easily filter strings, with the use of logical operators
• Try out short-circuiting logical AND, OR, and NEGATE
• Encourage the customer to use filters
Filtering strings is getting easier using the newest methods of Java. The viewer must learn how to use Pattern.asMatchPredicate for use in combinators, and making parsers.
• Learn about pattern asPredicate and asMatchPredicate
• Use asPredicate pattern on a stream of strings
• Use asMatchPredicate pattern on a stream of strings
Combining Java functional interface implementations is a proven technique.
• Explore combinators
• Show the customer how to create parsers
• Learn the use of predicates
Now with the latest version of Java, modules (modular programming) are stable and developers can adopt them to improve their apps.
• Explore the purpose of modules in Java
• Show how to create modules
• Present the usage of a multi-module system
Modern computers have much more processing power than older models. Parallel/ Concurrent programming lets you use the computing power of more threads. By using concurrent code, multiple actions are in progress at the same time. By using parallel code, multiple actions are simultaneously executed.
• Learn about programming concepts
• Know the side effects
• Learn about parallel stream and concurrent flow
Java 12 has new and modified Garbage Collectors: Epsilon, ZGC, Java 12’s Shenandoah, and G1. The viewer must learn how to handle them.
• Introduce the new collectors
• Show the viewer how to configure GCs
• Learn to use GCs
This video summarizes the entire course.
Have you been looking for a course to help you cover many aspects of Java programming, some of which you may know and some you probably never knew existed? Or have you been looking for best practices and techniques to speed up your development and increase your output and efficiency? Well, you've come to the right place!
In this course, you will explore wonderful things you can do with Java 11 and 12 to improve your programming skills with proven techniques. With this course, you'll learn to implement some practical and tested techniques to avoid taking longer methods and you'll master a quicker way to develop applications using the Java 12 programming language.
By the end of this course, you will have learned some exciting Java 12 tips, best practices, and techniques. You will be able to perform tasks and get the best out of your code much more easily and rapidly.
About the Authors
Janos Seteny is a programmer with comprehensive experience in developing and teaching. His most unique projects are a VBScript plugin for IntelliJ (a fully functional language plugin written in Java); a C header file transformation to Java interfaces; and an unstructured data parser for Imprint webpages that builds a Yellow Pages database. He has mastered various programming languages and also teaches at a university. All this, and his 25 years' experience, makes him the best teacher to choose.
Vince Zoltan Varga is a software test engineer with demonstrable experience in quality assurance and teaching. He has been working in IT services for a decade; is skilled in automation (Java and Ruby) and test management; and has experience leading and training in a company environment. Unique projects he has implemented involve leading QA profession communities; optimizing applications with the help of NoSQL; and web-based, financial, controlling, accounting, and process-tracking systems developed in Java. He is a strong quality assurance professional, Certified Tester, and Scrum master with a Master of Science (MSc) degree focusing on Computer Engineering.