Tag: lambdas
[Java8] – Threads with lambdas
Example: @Test public void myMethod(){ Runnable run = () -> {System.out.println(“Execute Runnable”);}; new Thread(run).start(); } Console :
[Java 8] – New method Sort in List
Now you can use this method sort when you have a List Object and want sort this. If you only … More
[Java 8] – ForEach for interations
Below you can see an exemple how it works. @Test public void myTestWithForEachOnly(){ // Create the list and itens List<String> … More
Java 8: Cool example to filter, compare and group by something using lambdas and streams
Example : In this example we take all foods are in a supermarket. We want only available products grouped by … More
[Java 8] – Lambdas expressions
Why should you care about this? It’s better to programming, it resolves the problems in a easy way, it easy … More