Unary Operator
This lesson explains the Unary operator, which is a subtype of the Function interface.
We'll cover the following
UnaryOperator<T>
The UnaryOperator<T>
interface represents a function that takes one argument of type T
and returns a value of the same type. This is similar to the Function
interface, which is a parent to the UnaryOperator
interface.
The UnaryOperator
does not define any new abstract methods. Since it extends the Function
interface from the same package, it inherits the following method from the Function
interface :
Get hands-on with 1400+ tech skills courses.