エラーを治す方法と、理由を教えてほしいです。
Java本格入門のインターフェースで起こったエラーなのですが、エラーの理由と治し方がわかりません。
どうかわかりやすく説明お願いします。
発生している問題・エラーメッセージ
The type DefaultFoo must implement the inherited abstract method Foo.Say()
The method say() of type DefaultFoo must override or implement a supertype method
The method say() is undefined for the type Foo
該当のソースコード
java
1public class DefaultFoo implements Foo { 2 3 private String message; 4 5 public DefaultFoo(String message) { 6 this.message = message; 7 } 8 9 @Override 10 public String say() { 11 return message; 12 } 13 14 15}
java
1 2public interface Foo { 3 String Say(); 4 } 5
java
1public class SampleClass { 2 public static void main(String...args) { 3 4 Foo foo = new DefaultFoo("Hello Foo!"); 5 6 System.out.println(foo.say()); 7 8 } 9} 10
補足情報
eclipse

回答4件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。