import java.util.*;
var nums = new ArrayList<>(
Arrays.asList(1, 2, 3));
Runnable action = () -> {
System.out.println("Child thread: " + nums);
};
//Run lambda at new thread
var thread = new Thread(action);
thread.start();
nums.add(4);
System.out.println("Main thread: " + nums);