blob: 0441a38f758e1cea39af370ea1591df31634211a [file] [log] [blame]
import java.util.function.IntSupplier;
public class AnonymousEvaluator {
public static void main(String[] args) {
int calc = calculate(new IntSup());
}
public static int calculate(IntSupplier supplier) {
return supplier.getAsInt() * 2;
}
private static class IntSup implements IntSupplier {
@Override
public int getAsInt() {
return 10 * 20;
}
}
}