Java tutorial
import java.util.function.Supplier; public class Main { public static void main(String[] args) { Supplier<Integer> rndRange = () -> (int) (Math.random() * 100); System.out.println(rndRange.get()); } }