Basics of Java 8 Lambdas!

This blog aims to explain the basics of functional programming, using Java 8 lambdas. The blog assumes you have no prior knowledge of the functional programming paradigm but have basic knowledge of Object-Oriented Programming.

What is Functional Programming.

Functional programming is nothing but a style of programming, that promotes pure functions. By pure function, I mean a piece of code that takes some input, performs computations, and gives the desired output. It doesn’t have any “side-effects” or tasks, like printing or manipulating variables outside its own scope. These functions are first-class functions, i.e., …

All you need to know about java’s thread life cycle!

This write-up is aimed at explaining the various states of a thread in the Java world. If you are are new to the multithreaded programming realm, try my other blog here that explains thread fundamentals.

According to Sun microsystems, there are 4 states in the java thread life cycle. They are:

  • New — A thread is in the “New” state, when an object of the thread class is instantiated but the “start” method is not invoked.
  • Runnable — When the “start” method has been invoked on the thread object. In…

Multithreading is a topic dreaded by many programmers. Probably its due to the fact that, if not written properly, multithreaded programs can cause bigger blunders than single-threaded programs and the damage done by multiple threads can be harder to assess. Some people find it difficult to understand, while others don’t bother studying it. Personally, I find it to be one of the most fascinating features of a programming language.

Through this blog, I strive to explain the nuances of multithreaded programming in simplest terms. …

Rajat Gogna

Knowledge not shared, is knowledge wasted.

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