Which two interfaces are considered to be functional interfaces? (Choose two.)
A. @FunctionalInterface interface InterfaceC { public boolean equals(Object o); int breed(int x); int calculate(int x, int y);
}
B. @FunctionalInterface interface InterfaceD { int breed(int x);
}
C. @FunctionalInterface interface InterfaceE { public boolean equals(int i); int breed(int x);
}
D. interface InterfaceA { int GERM = 13; public default int getGERM() { return GERM; }
}
E. interface InterfaceB { int GERM = 13; public default int getGERM() { return get(); } private int get() { return GERM; } public boolean equals(Object o); int breed(int x);
}
B & E are correct.
E is correct, as public boolean equals(Object o); does not count towards one method in interface, as it is a method from Object class.
B and E
Thank you
B&D
public boolean equals(Object o); // is Overriding equls() method in Object class
It is to say
B&E