Debug the interface problem

You implemented the two functional interfaces, as shown in the Java 8 code snippet given below.

public class University{
interface TheoryMarks{
abstract float theoryMarks();
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?

  1. Static method is defined after the abstract method
  2. A functional interface cannot extend another functional interface
  3. The PracticalMarks interface will have two abstract method
  4. Methods are not mentioned as public abstract

Related Posts

Close Bitnami banner