Advertisement
Kotuara

Практика7.7

Dec 23rd, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Random;
  4. import java.util.function.Supplier;
  5.  
  6. public class Main {
  7.  
  8.     public static void main(String[] args) {
  9.         Supplier <Integer> Ref = () -> {
  10.             Random random = new Random();
  11.             return random.nextInt(11);
  12.         };
  13.  
  14.         System.out.println(Ref.get());
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement