Unary Operator and Binary Operator are also two functional interfaces. They both extend the Function and BiFunction, respectively. Unary Operator extends Function, and Binary Operator extends Bi-Function.
```
import java.util.function.*;
public class Main {
public static void main(String args[]) {
UnaryOperator<Boolean> op = UnaryOperator.identity();
System.out.println(op.apply(true));
BinaryOperator<Integer> op2 = BinaryOperator.maxBy(
(a, b) -> (a > b) ? 1 : ((a == b) ? 0 : -1));
System.out.println(op2.apply(98, 12));
}
}
```