Click here to Skip to main content
15,890,438 members
Articles / Programming Languages / Java

Generators with Java 8

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
6 Jul 2014CPOL4 min read 50.8K   4  
Today we'll look at creating generators. In simple terms, a generator is a function which returns the next value in a sequence. Unlike an iterator, it generates the next value when needed, rather than returning the next item of a pre-generated collection. Some languages such as Python support

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions