Creating a small Collection in Java is very verbose using the traditional way.

Set<String> set = new HashSet<>();

Java 9 “of” method comes to rescue us


Modern Java is a hybrid of combining object oriented and functional paradigms together. Hence Java isn’t OOP anymore. This paradigm shift allows developers to tell what they want rather how it is done!

Photo by Tomas Sobek on Unsplash

Object-oriented programming makes code understandable by encapsulating moving parts while Functional programming makes code understandable by minimizing moving parts.

Programming paradigms supported by Java:
• Object-oriented programming
• Functional programming

Another two Programming paradigms supported by Java:
• imperative
• declarative

Object-oriented programming is an “imperative” paradigm, focuses on describing how a program operates via statements that change its state. …

A lambda expression is an unnamed block of code with optional parameters
that can be stored, passed around, & executed later.

Photo by Ignacio Amenábar on Unsplash
new Thread( 
() -> System.out.println("hello world")

This example, The Thread constructor expects an instance of Runnable. Equivalent without lambda would be,

new Thread(new Runnable() {
public void run() {
System.out.println("hello world 2");

() input parameters
-> Arrow separates the param list from the lambda body.
System.out.println(“hello world”) The lambda body defines the computation.

Lambda expressions can work with multiple parameters in a much more compact manner than anonymous inner classes.They …

Event Driven Architecture has a very close relationship to Message Driven Architecture. Let’s compare point to point traditional approach vs message driven vs Event driven architecture with an example,

Let’s consider air line system where if a flight is delayed it will update the parties to do tasks like

  • informing the passengers
  • booking hotels for night stay
  • scheduling another flight
  • issuing tokens for snacks

Classic programming models

This is the traditional approach where method a of application a directly make a call to method b of application b. …

The saga design pattern is a way to manage data consistency across software applications in distributed transaction scenarios. This will have non distributed transaction in each component and then sends event to trigger next transaction step in another computer. If any transaction fails, Saga will revert(compensating) each stage already completed. This pattern is defined in order to avoid locks on non local resources.

Photo by Devon Janse van Rensburg on Unsplash

Modern micro-services promote a database per micro-service model where it provides many benefits over traditional monolithic applications. Encapsulating domain in a single unit helps each service to use best data-store, programming language and also scaling capabilities.


Down load of your choice of OS box from this link and get your virtual environment up and running instantly

If you get a permission error when you try to…

This how you should be using maven to create a java project from the scratch.

Photo by Kon Karampelas on Unsplash

If you have already installed maven on your comuter run the following command. This will open you the interactive mode.

mvn archetype:generate

This will take sometime to load a big list of varies project types can create using maven.

Choose archetype:
1: remote -> am.ik.archetype:elm-spring-boot-blank-archetype (Blank multi project for Spring Boot + Elm)
2: remote -> am.ik.archetype:graalvm-blank-archetype (Blank project for GraalVM)
2934: remote -> (-)
2935: remote -> (-)

Last line of the list will be

Choose a number or apply filter…

Nuwan Zen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store