I have a functional interface
@FunctionalInterface
interface MyInterface {
<T> T modify(Object);
}
I can create anonymous class for this interface
MyInterface obj = new MyInterface(){
@Override
<T> T modify(Object obj){
return (T) obj
}
}
How to create lambda expression for this.
MyInterface obj -> {return (T) obj;}; // ! ERROR as T is undefined