Class or Interface excepted

Viewed 146

Here is the code:

public class Tuna {
    public void eat() {
        System.out.println("I am a tuna fish"); // Here it says class or interface excepted
    }
}

I have a Tuna class above that has a eat method. In that eat method, it says class or interface expected at the print line. Even though it is running smoothly, when I hover over the print line in the eat method it says class or interface expected. I already checked other questions related to it but I couldn't solve it. Any help is appreciated.

Image of the code

0 Answers
Related