Tag: javachallenges

stream predicate search

Neo Stream Search Java Challenge

Understanding the mechanics of the functional interface Predicate of a Stream is crucial if you want to create something meaningful with streams. On this challenge, we will explore important key methods when we work with a stream so that it becomes...

tokenizer regex java

Tokenizer Regex Java Challenge

Using a tokenizer with regex is a useful concept to know that is existent in programming languages. Often enough we need to manipulate Strings in a more sophisticated way, sometimes we need to validate, or we just need to break them down. Therefore...

stream limit filter

Stream limit filter Java Challenge

To manipulate data from a collection by using a stream is handy and cleaner. To learn how to use streams will make your Java code much better. To know how to limit to filter data with streams is crucial for you to do something useful with a stream...

optional ofNullable filter

Soprano ofNullable stream Challenge

Since Java 9, it’s possible to use Optional with a stream in case we need to manipulate values from a List. In this Java Challenge, we will explore the use of a stream in an Optional! Are you ready to solve this Java Challenge? If you want to...

lambda switch case

Lambda Switch Case Challenge

In Java 12 the new switch case with lambda preview feature was introduced which reduces the boilerplate code. In Java 14, this feature became standard. Now instead of using the break keyword in every case statement, we can simply use a lambda...

concurrent map

Concurrent Map Challenge

This Java Challenge will introduce the ConcurrentHashMap class that is useful to use in a multi-thread environment. The ConrrentHashMap can also be used to delete an element inside a for loop for example. The ConcurrentHashMap will synchronize...

serializable file

Serializable Object Java Challenge

Even still there are plans of removing Serialization from Java completely, it’s still relevant to know it since many systems and projects are using it. If you are curious to know more about the subject, you can check the following article: JDK...

function calculation

Function Calculation Java Challenge

Functional Programming is a very powerful paradigm that in Java, makes code more concise and easier to understand. The Function functional interface can be used as a first-class citizen function in Java, this means that we can pass a function to a...

Optional takeWhile dropWhile

Optional takeWhile dropWhile Challenge

The Optional concept is present in many other programming languages. The main goal of the Optional class is to avoid NullPointerException. It’s much easier to deal with null values when we use the concepts of an Optional. In this challenge, we...