Use this tag for questions specific to Java 8 which is version 8 (internal number 1.8) of the Java platform, released on 18 March 2014.
What's the difference between these two methods: Optional.flatMap() and Optional.map()? An example would be appreciated.
java java-8 optionalI have an ArrayList and want sort it in descending order. I use for it java.util.stream.Stream.sorted(…
java sorting java-8 comparator java-streamIs it possible to cast a stream in Java 8? Say I have a list of objects, I can do something …
java java-8 java-streamThe Java 8 Collectors.toMap throws a NullPointerException if one of the values is 'null'. I don't understand this behaviour, maps …
java nullpointerexception java-8 java-stream collectorsI am new to Java8. I have implemented lists and filters. I have done a null check in my code. …
filter java-8 java-stream empty-listI have a problem with the stream of Java 8 foreach attempting to move on next item in loop. I cannot …
java java-8Reading an interesting articles the guys claims that the difference between the two function are: Both functions aspire to add …
java java-8Suppose to have a class Obj class Obj{ int field; } and that you have a list of Obj instances, i.…
java filter java-8 java-streamHow can I check if a Stream is empty and throw an exception if it's not, as a non-terminal operation? …
java java-8 java-stream