code: public static <T> Collector<T, ?, Optional<T>> last() {
          return Collectors.reducing((v1, v2) -> v2);
      }
docs: Get a {@link Collector} that calculates the <code>LAST</code> function.
  <p>
  Note that unlike in (Oracle) SQL, where the <code>FIRST</code> function
  is an ordered set aggregate function that produces a set of results, this
  collector just produces the first value in the order of stream traversal.
  For matching behaviour to Oracle's [ aggregate function ] KEEP
  (DENSE_RANK LAST ORDER BY ... ), use {@link #minAll(Comparator)} instead.