public class LambdaDemo { public static void main(String[] args) { MyNum num = () -> 123.456; System.out.println("This is the value: " + num.getNum()); num = () -> Math.random() * 100; System.out.println("This is the random value: " + num.getNum()); System.out.println("This is one more random value: " + num.getNum()); } }