Cannot convert IntStream to some Object Stream

The IntStream class’s map method maps ints to more ints, with a IntUnaryOperator (int to int), not to objects.

Generally, all streams’ map method maps the type of the stream to itself, and mapToXyz maps to a different type.

Try the mapToObj method instead, which takes an IntFunction (int to object) instead.

.mapToObj(id -> new MyObject(id));

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)