Home » Java 8 » Page 2

Tag Archives: Java 8

Java 8 Stream – filter() & forEach() Example

Hello. In this tutorial, we will explain the most commonly used Java 8 Stream APIs: the forEach() and filter() methods. 1. Introduction Before diving deep into the practice stuff let us understand the forEach and filter methods. 1.1 forEach method This method is used to iterate the elements present in the collection such as List, Set, or Map. It is ...

Read More »

Java 8 vs Java 12

In this article, we will see a comparison of the Java 8 vs Java 12. 1. What is Java? Java is a programming language first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From ...

Read More »

Java 8 vs Java 10

In this article, we’re going to present Java 8 vs Java 10. Specifically, we are going to compare features and tools introduced in both versions. 1. Introduction Java is a programming language, object-oriented based, first introduced in 1995 by James Gosling at Sun Microsystems. In January 2010, Oracle Corporation acquired Sun Microsystems and since then they maintain and evolve the ...

Read More »

Download and Install Java Development Kit (JDK) 8

In this article, we will discuss the step-by-step process to download and install JDK (Java Development Kit) 8 in your machine and then compile and execute a java program from the command prompt. 1. Java 8 Download 1.1 Go to the jdk site To download Java 8, go to the site JDK 8. Go to the link, and you will ...

Read More »

Migrating from Java 8 to Java 13

In this article, we will demonstrate how to migrate an application from Java SE 8 to Java SE 13. 1. Introduction Oracle began a six-month release cadence for Java Standard Edition starting with Java 10. Instead of being major version releases, they are instead “feature releases”. This release cycle is in the spirit of Continuous Integration / Continuous Deployment and ...

Read More »

Overloading Java Methods Example

In this post, we feature a comprehensive article on Overloading Java Methods. Overloaded methods are methods with the same name signature but either a different number of parameters or different types in the parameter list. It is similar to constructor overloading, that allows a class to have more than one constructor having different argument lists. Method overloading is an example ...

Read More »

Printstream Java Example

This article is a quick introduction to the Printstream Java class available as part of Java ecosystem. 1. Introduction Stream refers to data essentially bytes at lowest level. To read and process data from a source, the data needs to be saved. Outputstream is the means to save the data to a sink. Outputstream is the superclass of all classes ...

Read More »

Java 8 Functional Interfaces Introduction Example

Hello readers! In this tutorial, we will learn the amazing feature of Java 8 Functional Interfaces. 1. Introduction To achieve the benefits of functional programming in Java, JDK developers introduced Functional Interfaces/Single Abstract Method (SAM) Interfaces in Java 8 programming. A functional interface is an interface that has only one abstract method A functional interface can have multiple default and ...

Read More »

Java 8 Lambda Expressions Introduction Example

Hello readers! In this tutorial, we feature a comprehensive article on Java 8 Lambda Expressions.  1. Introduction To achieve the benefits of functional programming in Java, JDK developers introduced Lambda Expressions in Java 8 programming. A lambda expression is a nameless function which does not have the name, return type, and access modifiers A lambda expression instance can be assigned ...

Read More »

Java 8 Optional In Depth Example

1. Introduction This is an in-depth article about Java 8 Optional. A new class Optional was introduced in Java 8. The optional class is part of java.util package. Optional is used to represent a value. It can be present or absent. No more null checks and NullPointerException are needed. Optional helps in avoiding any runtime NullPointerExceptions. It helps in developing clean ...

Read More »