Thursday, August 23, 2018

streams

IntStream
LongStream
DoubleStream


When is Navaratri in 2018?

Navaratri in 2018 will start on Tuesday, the 9th of October(9/10/2018) and will continue for 9 days until Wednesday, the 17th of October.

http://www.when-is.com/navaratri-2018.asp


I love the :lambda: sign


functional programming

java 8 streams

package net.sness;

import java.util.*;
import java.util.stream.Stream;

public class TestMax {
public static void main(String[] args) {

Collection<String> strings = Arrays.asList("one", "two", "three");

Optional<String> longest = strings.stream()
.max(Comparator.comparingInt(String::length));

System.out.println("longest=" + longest.get());

}
}

Sunday, August 19, 2018