Step by step learning
What is the output of the code?
Supplier<Boolean> s = () -> { Random generator = new Random(); int n = generator.nextInt(1); return n % 2 == 0; }; System.out.println(s.getAsBoolean());
Compilation fails
Sometimes true, sometimes false
false
true
Please log in or register to have a possibility to add comment.
Please log in or register to have a possibility to add comment.