Expression closure

Report a typo

Using closure write a lambda expression that calculates ax2+bx+c a*x^2 + b*x + c where a, b, c are context final variables. They will be available in the context during testing. Note, the result is double.

Solution format. Submit your lambda expression in any valid format with ; on the end.

Examples: (x, y) -> x + y; (x, y) -> { return x + y; }

Write a program in Java 17
import java.util.function.DoubleUnaryOperator;

class Operator {

public static int a = 10;
public static int b = 20;
public static int c = 30;

public static DoubleUnaryOperator unaryOperator = // Write your code here
}
___

Create a free account to access the full topic