Added IntStream.of constructor
This commit is contained in:
parent
44dfb1a076
commit
7c21f2e279
|
@ -31,7 +31,7 @@ public class IntStreamsConversionsUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void intStreamToString() {
|
public void intStreamToString() {
|
||||||
String first3numbers = IntStream.range(0, 3)
|
String first3numbers = IntStream.of(0, 1, 2)
|
||||||
.mapToObj(String::valueOf)
|
.mapToObj(String::valueOf)
|
||||||
.collect(Collectors.joining(", ", "[", "]"));
|
.collect(Collectors.joining(", ", "[", "]"));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue