Blog Archives
1 2 3 4

01: 19 Java 8 Functional Programming FAQs

Good handle on Java OOP concepts and FP concepts are very important NOT only from writing quality code perspective, but also from job interviews perspective to be able to do well in written tests & technical interviews.

Q1. Can you explain your understanding of Functional Programming (FP)?

Read more ›



02: Java 8 Streams, lambdas, intermediate vs terminal ops, and lazy loading with simple examples

A stream is an infinite sequence of consumable elements (i.e a data structure) for the consumption of an operation or iteration. Any Collection<T> can be exposed as a stream. It looks complex, but once you get it, it is very simple. The operations you perform on a stream can either...

Members Only Content
Log In Register Home


03: Functional interfaces and Lambda expressions Q&A

The functional interfaces and Lambda expressions are going to make your code concise when coding with Java 8. These are the most awaited features among Java developers. If you understand the following examples, you will know what a lambda expression is & … Read more ›...

Members Only Content
Log In Register Home


04: Convert Lists to Maps and Maps to Lists with Java 8 power

Why convert from a list to a map? Maps allow you to store and access data by a “KEY”. Lists only allow you to access data by either index or by looping through the whole list to find a value that you are interested in. … Read more ›...

Members Only Content
Log In Register Home


05: 7 Java FP (lambda expressions) real life examples in wrangling normal & big data

This post extends Transforming your thinking from OOP to FP. In Big-data, functional programming is prevalent when working with data sets. For example, writing a Spark job to work with RDDs (Resilient Distributed Data sets).

In Imperative (E.g. OOP, procedural programming, etc) programming you can say

where you are assigning x to x + 5.

Read more ›



05: Finding the 2nd highest number in an array

Requirements gathering Does the array allow duplicates? If duplicates are allowed, then do you need to report duplicates? For example, in {2,4, 6, 3, 6, 5}, is 6 or 5 the second highest? Analysis If duplicates are not allowed, sort the array (Arrays.sort(…)) and get the second last element, …...

Members Only Content
Log In Register Home


06: Java 8 way of File reading and functionally processing the data

Output:

#1 double colon notation ::

The new double colon (::) operator that Java 8 has to convert a normal method into lambda expression. So,

Instead of:

You can do:

#2 Why is stream::iterator used?

Read more ›



1 2 3 4
Why & What are the benefits

🎯 Why java-success.com?

🎯 What are the benefits of Q&As approach?

Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, Architecture – Distributed, Big Data – Spark, etc. Some posts belong to multiple categories.

800+ Java & Big Data Q&As Menu

Top