Which of the following are valid functional interface ? Select one or more: @FunctionalInterface interface Test { public void calculate(int a,int b,char oper); public default void display(){ System.out.println("default method"); } } @FunctionalInterface interface Test { int a=10; public void display(); } @FunctionalInterface interface Test { public void display(); } @FunctionalInterface interface Test { public void display(); public char getInput(); }
Answers
Answered by
5
Answer:
Valids are
@FunctionalInterface
interface Test
{
public void calculate(int a,int b,char oper);
public default void display(){
System.out.println("default method");
}
}
and
@FunctionalInterface
interface Test
{
public void display();
}
Explanation:
Similar questions