65.9K
CodeProject is changing. Read more.
Home

Generators with Java 8

starIconstarIconstarIconstarIconstarIcon

5.00/5 (1 vote)

Jul 5, 2014

CPOL

4 min read

viewsIcon

53732

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

Generators with Java 8 - CodeProject