[JAVA rookie] an unknown error occurred when writing the interface for the first time.

The

code is as follows:

abstract class Animal {
    int age;
    public Animal() {};
    public Animal(int age) {
        this.age = age;
    }
}

class Bird extends Animal implements Fly {
    public Bird(int age) {
        super(age);
        System.out.println("");
        System.out.println("" + age + "");
        }
    }
    public void service() {
        System.out.println("");
    }
}

class Fish extends Animal {
    public Fish(int age) {
        super(age);
        System.out.println("5");
        System.out.println("" + age + "");
    }
}

public class Test {
    public static void main(String[] args) {
        Bird bird = new Bird(4);
        bird.service();
        Fish fish = new Fish(2);
    }
}

public interface Fly {
    void service();
}

execution problems are as follows:

clipboard.png

Jun.19,2021

public void service () has been preceded by }


clipboard.png
public void service () is no longer in class

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f8db-2c497.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f8db-2c497.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?