In java 8 when we have a functional interface it carries only one method which is not implemented :
@FunctionalInterface
public interface Interface1 {
void method1(String str);
}
Now when we implement this Interface in a Class :
public class MyClass implements Interface1 {
@Override
public void method1(String str) {
}
}
Finally Lets say when I need to call this method from another class
Interface1 object = new MyClass();
object.method1("Say Hello");
Will this be equivalent to
object.("Say Hello");
If so then we don't need method name for funcitonal interfaces.