This code snippet is from this lesson of Learn Intermediate Java
CrystalBall c = new CrystalBall();
questions.stream()
.forEach(q -> {new Thread(() -> c.ask(q)).start();});
I understand much of it. But what I don’t understand is why Thread’s parameter looks so odd. Why couldn’t it be just Thread(c.ask(q))? Could you please tell me what the purpose of this seemingly pointless lambda expression () ->
is?