You implemented the two functional interfaces, as shown in the Java 8 code snippet given below.
public class University{ @FunctionalInterface interface TheoryMarks{ abstract float theoryMarks(); } @FunctionalInterface interface PracticalMarks extends TheoryMarks{ abstract float practicalMarks(); public static void printMarks() { System.out.println("Calculation of marks"); }}}
However, the code is returning a compilation error. What could be the reason for receiving this compilation failure?
Options
- Static method is defined after the abstract method
- A functional interface cannot extend another functional interface
- The PracticalMarks interface will have two abstract method
- Methods are not mentioned as public abstract