Code Pumpkin

Tag Archives: Java8

What is optional and why it is there? | Java8

October 29, 2017
Posted by Dipen Adroja

Have you ever been tired of putting null checks all over the code to avoid any unnecessary NullPointerExceptions. Java 8 has introduced a new class Optional in java.util package. It is used to represent a value is present or absent. The main advantage of this new construct is that No more too many null checks and NullPointerException. It avoids […]

Access Modifiers in Java

September 2, 2017
Posted by Dipen Adroja

In this article, we will discuss one of the basic feature of Java- Access Modifiers. As the name suggests access modifiers in Java helps to restrict the scope of a class, constructor, variable, method or data member. Assigning an access modifier to a class, constructor, field or method is also sometimes referred to as "marking" that […]

java.util.stream – Stream APIs basics | Java8

July 29, 2017
Posted by Dipen Adroja

In this article we will walk through basic overview of java.util.stream package. Package java.util.stream contains classes that support functional type of operations on streams of elements, such as map-reduce transformation, filtering etc. By the end of the article we will be able to answer following questions: 1. What is streams?  2. How it can be created?  […]

Interface vs Abstract class in Java

July 7, 2017
Posted by Abhi Andhariya

Interface has been evolved a lot in last two releases of java. Refer interface evolution in java for the same. However, there are still many differences between interface and abstract class. It is one of the most asked interview questions for entry level java developer interviews. Even though both are used to achieve abstraction in java, there are significant differences […]

Default Method In Interface | Java8

May 13, 2017
Posted by Dipen Adroja

In this article, we will discuss Default Method in interface which was introduced from Java8. This feature allows developer to add new methods to the interfaces without breaking the existing implementation of these interface. It provides flexibility to allow interface to define implementation which will will be used when concrete class does not provide an implementation […]

Stream API | Java8

May 12, 2017
Posted by Dipen Adroja

In this article, we are going to walk through Stream API which is introduced as a part of Java8. Using Stream API, we can make our collection manipulation more declarative and thread safe in case of multi-threaded environment with very ease. The advantage of using Stream API to manipulate collections is we only ask the […]

How does HashMap work internally in Java?

May 4, 2017
Posted by Abhi Andhariya

How does HashMap work internally in java is one of the most asked core java interview questions. Most of the candidates do not give the satisfactory explanation. This question shows that candidate has good knowledge of Collection. So this question should be in your TO-DO list before appearing for the interview. There are four things we should […]

Java8 Features

April 22, 2017
Posted by Dipen Adroja

Java 8 is released in March 2014. In this article, we will look into some of the java 8 features with examples. You can download JDK 1.8 from here based on your OS Platform requirements. We are going to cover below important features of the Java8: Lambda Expressions Functional Interfaces Stream Collection Type Interface Default […]

Functional Interface | Java8

April 22, 2017
Posted by Dipen Adroja

In this article, we are going to discuss about one of the Java8 feature: Functional Interface. Java 8 is released in March 2014. You can download JDK 1.8 from here based on your OS Platform requirements. Java developer around the world frequently uses the Runnable, Comparator, Callable etc. One common thing about the above mentioned interfaces […]

Lambda Expression | Java8

April 21, 2017
Posted by Dipen Adroja

In this article, we will go through the lambda expression which is introduced as  a part of Java8. This is one of my favorite feature from the Java8 apart from the Stream. This feature we can see as Java's support to the functional programming language. In simple word we can treat lambda expression as an […]

Previous Posts
Total Posts : 124
follow us in feedly

Like Us On Facebook