Home » Author Archives: Nawazish Khan

Author Archives: Nawazish Khan

Nawazish Khan
I am Nawazish, graduated in Electrical Engineering, in 2007. I work as a Senior Software Engineer with GlobalLogic India Ltd (Banglore) in the Telecom/Surveillance domain. A Java Community Process (JCP) member with an unconditional love (platform, technology, language, environment etc does not matter) for computer programming. Extremely interested programming multi-threaded applications, IoT devices (on top of JavaME) and application containers. The latest language of interest being Google Go; and Neo4j as the NoSQL Graph Database solution.

Java 8 Anonymous Function Example

1. Introduction Java is an object Oriented Programming Language, and as such concepts like Encapsulation and Abstraction sits at the heart of it. However, since Java is a bit-too-much Object Oriented at its genome structure, that often times than not, it adds a lot of verbosity and boiler plate to its language constructs.               ...

Read More »

Java 8 Array to Stream Example

1. Introduction Official javadoc of java.util.stream.Stream states that it is “A sequence of elements supporting sequential and parallel aggregate operations”. And such every Stream is backed by a source which would provide the Stream with its “sequence of elements”. In Java, like most other programming languages, sequence of elements is generally provided via two constructs: (i) the java.util.Collection instances and ...

Read More »

Java 8 Date and Time API Tutorial

JDK 1.0 had java.util.Date class giving access to Java’s first Date API. However soon after its usage, it started to show cracks of problems on its brittle surface. It did not take any longer to realize that java.util.Date was not thread-safe!                   Table Of Contents 1 . Introduction 2. The new Date ...

Read More »

Java Functional Interface Example

1. Introduction Functional interfaces are no different than the plain-vanilla interface concept of Java that we all have been using, with the only difference that Functional Interfaces can have one and only one abstract method in it. Beginning with JDK8, since we can now have concrete implementations of functions/methods inside Interfaces marked by the key word “default”, there can be ...

Read More »

Java ScheduledExecutorService Example

1. Introduction It is common requirement in software development that we want tasks to run (i) periodically or (ii) start after a fixed delay. Since Java is known for richness of its development platform, it abstracts such requirements in an interface java.util.concurrent.ScheduledExecutorService and its concrete implementation java.util.concurrent.ScheduledThreadPoolExecutor In this post we would not just look into these APIs but also ...

Read More »

Java CompletionService Example

1. Introduction to CompletionService The Java JDK provides some “services” for common use cases. The asynchronous Producer-Consumer pattern is one such common use case which is often required in day to day software development. As such the JDK provides platform level support in the form of APIs like java.util.concurrent.CompletionService and java.util.concurrent.ExecutorCompletionService. CompletionService abstracts the service of handling tasks which could ...

Read More »

Java CompletionStage and CompletableFuture Example

1. Introduction Java JDK8 included the big fat interface called CompletionStage in the java.util.concurrent package. The same package also contains CompletableFuture which is a library implementation of CompletionStage. In this post we would see how CompletionStage and CompletableFuture provide piped asynchronous API thus enhancing reactive programming support in Java at the platform level. Since we are talking about JDK8 APIs, ...

Read More »

JavaFX ImageView Example

1. Introduction JavaFX exposes easy-to-use API for painting images on its stage via the javafx.scene.image.ImageView class. An instance of ImageView class does not merely renders images loaded instance of javafx.scene.image.Image class, but also provides a variety of flexible manipulations to control various aspects of image rendering; in this post we are going to have a look at them. We would ...

Read More »