Java 8 Stream peek method Example

6 days ago lalitbhagtani 0
In this tutorial, we will learn about Java 8 stream peek method. peek() method :- This method takes one Consumer as an argument, this consumer accepts one parameter T as an input argument and return one stream of parameter T as a return value. The main purpose of this method is to support debugging, When you want to see Read More

Convert XMLGregorianCalendar to Date Object

1 week ago lalitbhagtani 0
XMLGregorianCalendar to Date Object :- In this tutorial, we will learn to convert XMLGregorianCalendar to Date Object. If you had worked on a project which consume or publish SOAP web services, then you would had faced a problem in converting XMLGregorianCalendar to Date Object and vice versa. Let’s see an implementation with the help of Read More

Convert Date to XMLGregorianCalendar Object

1 week ago lalitbhagtani 0
Date to XMLGregorianCalendar Object :- In this tutorial, we will learn to convert Date to XMLGregorianCalendar Object. If you had worked on consuming or publishing SOAP web services, then you would had faced the problem in converting Date to XMLGregorianCalendar Object and vice versa. Let’s see an implementation with the help of an example :- Example Read More

Java 8 Stream flatMap method Example

3 months ago lalitbhagtani 0
In this tutorial, we will learn about Java 8 stream flatMap method. flatMap() method :- This method takes one Function as an argument, this function accepts one parameter T as an input argument and return one stream of parameter R as a return value. When this function is applied on each element of this stream, it produces a Read More

Java 8 Stream map method Example

3 months ago lalitbhagtani 0
In this tutorial, we will learn about Java 8 stream map method. map() method :- This method takes one Function as an argument and returns a new stream consisting of the results generated by applying the passed function to all the elements of the stream. Syntax :- <R> Stream<R> map ( Function<? super T, ? extends R> Read More

Java 8 Stream limit & skip method Example

3 months ago lalitbhagtani 0
In this tutorial, we will learn about Java 8 stream limit and skip method. limit() method :- This method takes one long ( N ) as an argument and return a stream of length N, after truncating it. Syntax :- Stream<T> limit(long n) Reference :- limit() method JavaDocs Problem Statement :- You have given a list of integers, remove all Read More

Java 8 Stream findAny & findFirst method Example

3 months ago lalitbhagtani 0
In this tutorial, we will learn about Java 8 stream findAny and findFirst method. Note :- To keep this tutorial short and concise, Employee Bean used in the example is not given here, you can check it here. findAny() method :- This method is called on Stream object, it returns an Optional object containing any one element of the Read More

Java 8 Convert List to Map using Streams API

3 months ago lalitbhagtani 0
Java 8 Convert List to Map :- In this tutorial, we will learn to convert list to map using Stream API. Note :- To keep this tutorial short and concise, Employee Bean used in the example is not given here, you can check it here. Problem Statement :- Given a list of Employee object convert it Read More

Java 8 filter method Example

3 months ago lalitbhagtani 0
In this tutorial, we will learn about Stream java 8 filter method. filter() method :- This method is called on Stream object, it takes one Predicate as an argument and returns a new stream consisting of the elements of the called stream that match the given predicate. Syntax :- Stream<T> filter(Predicate<? super T> predicate) Reference :- filter() method Read More

Java 8 Convert Map to List using Streams API

3 months ago lalitbhagtani 0
Java 8 Convert Map to List :- In this tutorial, we will learn to convert map to list using Stream API. Problem Statement :- Given a map of Integer as a key and String as a Value convert it to the list, containing all the values of Map. Let’s see the implementation of above problem Read More
Skip to toolbar Log Out