interface Rideable {
String getGait();
}
public class Test implements Rideable {
int weight = 2;
String getGait() {
return " mph, lope";
}
void go(int speed) {
++speed; weight++;
int walkrate = speed * weight;
System.out.print(walkrate + getGait());
}
public static void main(String[] args) {
new Test().go(8);
}
}
Why it showing the above error?
While running this I get compilation fails
What is the access specifier of the method getGait() in the Test class?