interface Rideable {
String getGait();
}
public class Camel implements Rideable {
String getGait() { return " mph, lope"; }
}
Why does the compilation fail? I really don't know why the compile error?
By default the modifier for interface's method is public. So when you implement it. It need to be public. Add public to your getGait method should resolve it