+ 23
Does Java have sth like "generatores" of Python?
maybe we can create its behaviour with static variables?
8 Respostas
+ 5
Stream generators? :)
+ 3
Generators? Yes Java has a pseudo generator method that uses the RANDOM math class. Its already a unary operator.
+ 2
you may create streams but they are different. rxJava may be an alternative.
+ 1
Unary in that it doesn't need two operands to work.
+ 1
better than random stream is to create a stream from data or from iterator (Stream.iterate) which is a bit similar but can't create infinite stream and consume memory. generators don't consume memory
0
Janet Jane can you post a reference ?