The JDK API for managing and controlling native Processes is getting a big update in Java 9. This article tells what’s changed and why it’s a great thing for the future of Java.Read more
In this article we will introduce a couple of interesting concepts from Akka by giving an overview of how to implement the pipes and filters enterprise integration pattern. Akka is a popular library that provides new approaches to write modern reactive software in Java and Scala.Read more
At IteratrLearning we love teaching Java courses, and find that a lot of the attendees enjoy coding in Java. One of the things that can irritate about Java, however, is that it’s often overly verbose or ceremonious when it comes to doing the most basic of things. One of the ways that Java 9 helps solve this problem is by providing ways of instantatiating collections from specific values in a very abbreviated way.Read more
Java 8 introduced
CompletableFuture<T> as an enhancement to
Future<T>. It is a new class which lets you express the flow of information from different tasks using a callback driven style. A
CompletableFuture is used for defining computations on singular events, which is a different use case than computations on streams of events (e.g.
Observable using RxJava). In this article, you will learn about the problem with timeouts in Java 8’s CompletableFuture and the improvements that Java 9 brings.
So we’ve already talked a little bit about the improvements in Java 9 to two
features that were introduced in Java 8: Streams and Collectors.
But what about one of our other Java 8 friends:
Optional. At Iteratrlearning
we’re real fans of the
Optional type. We’ve found that, if used well, it can
make your code more explicit and reduce the scope for bugs.
Collectors is an addition to Java 8 which let you specify data processing queries by aggregating the elements of a
Stream into various containers such as
Set. For example, you can create a Map of the sum of expenses for each year as follows using the
summingLong collector from the
Collectors class. In the rest of this article we will assume static imports when referring to static method from the
We’ve found, while teaching developers about lambdas and Streams in Java 8, that many developers really appreciate the code that comes out at the other end. It tends to read a lot more like the problem that developers are trying to solve than traditional for loops and, as a side effect, is often shorter to boot. That doesn’t mean that the Streams API is perfect or even complete. In this article we will be looking at a few small improvements that are scheduled for Java 9 that make it even better.Read more
In this post, you will learn about a different approach from traditional Java programming that helps you to use parallel streams the right way in your code.Read more
Java 8 adds functions as a new form of value. What does this mean? Let’s look at a simple example.Read more
Usually, when writing a unit test you call a method in your test code that gets called in your application. Given some inputs and possibly test doubles, you call these methods to test a certain behavior happening and then specify the changes you expect to result from this behavior.Read more
Generic types were added to java way back in 2004 and have had extensive usage by different libraries and application developers ever since. Not all generics features have had equal usage though. In this blog post we’re going to explore Intersection Types: which are both one of the lesser-known features that Java Generics offers.Read more
subscribe via RSS