Home  >  Forum  >  Core Java
Post New Query

How to use Stream empty() method in java 8


joined on
August 11,2014
Asked on October 08,2016
How to use Stream empty() method in java 8?
joined on
November 18,2013
Replied on October 08,2016

According to java doc

static <T> Stream<T> empty()

Returns an empty sequential Stream.

We can use in our code as follows

Stream<Integer> intStream = Stream.empty();
Stream<String> strStream = Stream.empty();


Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us