-
Java 8 Stream.iterate examples
In Java 8, we can use Stream.iterate to create stream values on demand, so called infinite stream.
Date: 2019-08-11 View: 1520
-
Java Convert ArrayList<String> to String[]
In the old days, we can use list.toArray(new String[0]) to convert a ArrayList<String> into a String[]
Date: 2019-08-11 View: 1520
-
Java Convert Array to ArrayList
In Java, we can use new ArrayList<>(Arrays.asList(array)) to convert an Array into an ArrayList
Date: 2019-08-11 View: 1520
-
Java 8 Stream The peek() is not working with count()?
Many examples are using the .count() as the terminal operation for .peek(), for example:
Date: 2019-08-11 View: 1520
-
Java Prime Numbers examples
The following Java examples will print a list of all the prime numbers up to 1,000:
Date: 2019-08-11 View: 1520
-
Java 8 Stream Convert List<List<String>> to List<String>
As title, we can use flatMap to convert it.
Date: 2019-08-11 View: 1520
-
Java Regular Expression Examples
Java 8 stream and regular expression examples.
Date: 2019-08-11 View: 1520