As we begin a series on functional programming, see why you should consider making the move and how you can incorporate it using some familiar Java.
If functional programming has your attention, let’s start with the basics: functions. You can store functions as objects, take them as arguments, return them, and more.
Use Optionals when there is a clear need to represent ‘no result’ or where null is likely to cause errors. Otherwise, stick to nulls.
Streams are an important functional approach that can impact performance via parallelism, augment and convert data structures, and add new tools to your kit.
Now that you know some functional programming basics, let’s use lambdas to optimize our runtime with the help of a Splitter.